Sha256: 8290fc0d9e79e8374c1ab6c7dabbb012d9b10aa582710c3b7ccb795ebfc89d8e
Contents?: true
Size: 940 Bytes
Versions: 5
Compression:
Stored size: 940 Bytes
Contents
require 'spec_helper' describe Houdini, ".submit!" do it "should call .request with the right paramers" do Houdini.setup "some_environment", :api_key =>"SOME-API-KEY", :app_url => "http://localhost:3000" expected_params = { :environment => "some_environment", :api_key => "SOME-API-KEY", :blueprint => :blueprint_name, :postback_url => "http://localhost:3000/houdini/ClassName/42/postbacks", :input => { :input1 => 1, :input2 => 'two' } } Houdini.should_receive(:request).with(expected_params) Houdini.submit! :blueprint_name, "ClassName", 42, :input1 => 1, :input2 => 'two' end it "should not send requests if environment is 'test'" do Houdini.setup "test", :api_key => "SOME-API-KEY", :app_url => "http://localhost:3000" Houdini.should_receive(:request).never Houdini.submit! :blueprint_name, "ClassName", 42, :input1 => 1, :input2 => 'two' end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
houdini-0.3.4 | spec/houdini_spec.rb |
houdini-0.3.3 | spec/houdini_spec.rb |
houdini-0.3.2 | spec/houdini_spec.rb |
houdini-0.3.1 | spec/houdini_spec.rb |
houdini-0.3.0 | spec/houdini_spec.rb |