spec/bearcat/client/sections_spec.rb in bearcat-0.1.1 vs spec/bearcat/client/sections_spec.rb in bearcat-0.3
- old
+ new
@@ -6,46 +6,44 @@
end
it "returns all sections for a course" do
stub_get(@client, "/api/v1/courses/3/sections").to_return(json_response("course_sections.json"))
sections = @client.course_sections(3)
- expect(sections.first['name']).to eq('test')
- expect(sections.first['id']).to eq(70)
- expect(sections.first['course_id']).to eq(3)
+ sections.first['name'].should == 'test'
+ sections.first['id'].should == 70
+ sections.first['course_id'].should == 3
end
it "returns a section" do
stub_get(@client, "/api/v1/sections/72").to_return(json_response("section.json"))
section = @client.section(72)
- expect(section['name']).to eq('Section003')
- expect(section['id']).to eq(72)
- expect(section['course_id']).to eq(3)
+ section['name'].should == 'Section003'
+ section['id'].should == 72
+ section['course_id'].should == 3
end
it "creates a section" do
stub_post(@client, "/api/v1/courses/3/sections").
with(:body => {"course_section"=>{"name"=>"Section003"}}).to_return(json_response("create_section.json"))
section = @client.create_section(3, {"course_section[name]" => "Section003"})
- expect(section['course_id']).to eq(3)
- expect(section['id']).to eq(72)
- expect(section['name']).to eq('Section003')
+ section['course_id'].should == 3
+ section['id'].should == 72
+ section['name'].should == 'Section003'
end
it "updates a section" do
stub_put(@client, "/api/v1/sections/72").with(:body => {"course_section"=>{"name"=>"Section003"}}).to_return(json_response("update_section.json"))
section = @client.update_section(72, {"course_section[name]" => "Section003"})
- expect(section['course_id']).to eq(3)
- expect(section['id']).to eq(72)
- expect(section['name']).to eq('Section003')
+ section['course_id'].should == 3
+ section['id'].should == 72
+ section['name'].should == 'Section003'
end
it "deletes a section" do
stub_delete(@client, "/api/v1/sections/72").to_return(json_response("update_section.json"))
section = @client.delete_section(72)
- expect(section['course_id']).to eq(3)
- expect(section['id']).to eq(72)
- expect(section['name']).to eq('Section003')
+ section['course_id'].should == 3
+ section['id'].should == 72
+ section['name'].should == 'Section003'
end
-
-
end
\ No newline at end of file