spec/serializable/resource_spec.rb in restpack_serializer-0.4.2 vs spec/serializable/resource_spec.rb in restpack_serializer-0.4.3

- old
+ new

@@ -4,11 +4,11 @@ before(:each) do @album = FactoryGirl.create(:album_with_songs, song_count: 11) @song = @album.songs.first end - let(:resource) { SongSerializer.resource(params) } + let(:resource) { MyApp::SongSerializer.resource(params) } let(:params) { { id: @song.id.to_s } } it "returns a resource by id" do resource[:songs].count.should == 1 resource[:songs][0][:id].should == @song.id.to_s @@ -38,10 +38,10 @@ # https://github.com/json-api/json-api/issues/7 end describe "song with no artist" do let(:song) { FactoryGirl.create(:song, :artist => nil) } - let(:resource) { SongSerializer.resource(id: song.id.to_s) } + let(:resource) { MyApp::SongSerializer.resource(id: song.id.to_s) } it "should not have an artist link" do resource[:songs][0][:links].keys.should_not include(:artist) end end