Module: Fontana::Fixture
- Included in:
- Fontana
- Defined in:
- lib/fontana/fixture.rb
Instance Method Summary collapse
Instance Method Details
#load_fixture(fixture_name, options = {}) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/fontana/fixture.rb', line 8 def load_fixture(fixture_name, = {}) = .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 |