module Fontana::Fixture
Public Instance Methods
load_fixture(fixture_name, options = {})
click to toggle source
# File lib/fontana/fixture.rb, line 8 def load_fixture(fixture_name, options = {}) options = options.update({host: "localhost", port: 3000}) c = HTTPClient.new res = c.post("http://#{options[:host]}:#{options[:port]}/libgss_test/fixture_loadings/#{fixture_name}.json", "_method" => "put") raise "#{res.code} #{res.http_body.content}" unless res.code.to_s =~ /\A2\d\d\Z/ end