Sha256: 3dd87b62ae0169c9ca97f35426cdbb6c960749cab97f7140ad816ce0b57581c2
Contents?: true
Size: 862 Bytes
Versions: 11
Compression:
Stored size: 862 Bytes
Contents
shared_examples_for "defining a model callback" do describe "for a" do describe "around_api_response" do it "skips rendering if not yielded" do @luke.skip_api_response = true @luke.as_api_response(:name_only).keys.should include(:skipped) end it "renders if yielded" do @luke.as_api_response(:name_only).keys.should_not include(:skipped) end end describe "before_api_response" do it "is called properly" do @luke.as_api_response(:name_only) @luke.before_api_response_called?.should eql(true) end end describe "after_api_response" do it "is called properly" do @luke.as_api_response(:name_only) @luke.after_api_response_called?.should eql(true) end end end end
Version data entries
11 entries across 11 versions & 2 rubygems