Skip to content

Commit

Permalink
Migrate 'should' syntax to 'expect'
Browse files Browse the repository at this point in the history
  • Loading branch information
diegodurs committed May 12, 2015
1 parent 4dd3db1 commit f85f74b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions spec/models/recording_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@
describe MusicBrainz::Recording do
describe '.find' do
it "gets no exception while loading release info" do
lambda {
expect {
MusicBrainz::Recording.find("b3015bab-1540-4d4e-9f30-14872a1525f7")
}.should_not raise_error(Exception)
}.to_not raise_error(Exception)
end

it "gets correct instance" do
track = MusicBrainz::Recording.find("b3015bab-1540-4d4e-9f30-14872a1525f7")
track.should be_an_instance_of(MusicBrainz::Recording)
expect(track).to be_an_instance_of(MusicBrainz::Recording)
end

it "gets correct track data" do
track = MusicBrainz::Recording.find("b3015bab-1540-4d4e-9f30-14872a1525f7")
track.title.should == "Empire"
expect(track.title).to eq "Empire"
end
end

describe '.search' do
it "searches tracks (aka recordings) by artist name and title" do
matches = MusicBrainz::Recording.search('Bound for the floor', 'Local H')
matches.length.should be > 0
matches.first[:title].should == "Bound for the Floor"
matches.first[:artist].should == "Local H"
expect(matches.length).to be > 0
expect(matches.first[:title]).to eq "Bound for the Floor"
expect(matches.first[:artist]).to eq "Local H"
end
end
end
12 changes: 6 additions & 6 deletions spec/models/track_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
describe MusicBrainz::Track do
describe '.find' do
it "gets no exception while loading release info" do
lambda {
expect {
MusicBrainz::Track.find("b3015bab-1540-4d4e-9f30-14872a1525f7")
}.should_not raise_error(Exception)
}.to_not raise_error(Exception)
end

it "gets correct instance" do
track = MusicBrainz::Track.find("b3015bab-1540-4d4e-9f30-14872a1525f7")
track.should be_an_instance_of(MusicBrainz::Track)
expect(track).to be_an_instance_of(MusicBrainz::Track)
end

it "gets correct track data" do
track = MusicBrainz::Track.find("b3015bab-1540-4d4e-9f30-14872a1525f7")
track.recording_id.should == "b3015bab-1540-4d4e-9f30-14872a1525f7"
track.title.should == "Empire"
track.length.should == 233013
expect(track.recording_id).to eq "b3015bab-1540-4d4e-9f30-14872a1525f7"
expect(track.title).to eq "Empire"
expect(track.length).to eq 233013
end
end
end

0 comments on commit f85f74b

Please sign in to comment.