Update rspec syntax to v3

update rspec syntax to v3

change syntax to rspec v3

oops. fix typo

mailers classes with rspec3 syntax

helpers with rspec3 syntax

jobs with rspec3 syntax

serializers with rspec3 syntax

views with rspec3 syntax

support to rspec3 syntax

category spec with rspec3 syntax
This commit is contained in:
Luciano Sousa
2014-12-31 11:55:03 -03:00
parent fce74e64a1
commit b3d769ff4f
80 changed files with 1245 additions and 1247 deletions

View File

@@ -3,7 +3,7 @@ require 'spec_helper'
describe UserProfile do
it 'is created automatically when a user is created' do
user = Fabricate(:evil_trout)
user.user_profile.should be_present
expect(user.user_profile).to be_present
end
describe 'rebaking' do
@@ -12,11 +12,11 @@ describe UserProfile do
user_profile.update_columns(bio_raw: "test", bio_cooked: "broken", bio_cooked_version: nil)
problems = UserProfile.rebake_old(10)
problems.length.should == 0
expect(problems.length).to eq(0)
user_profile.reload
user_profile.bio_cooked.should == "<p>test</p>"
user_profile.bio_cooked_version.should == UserProfile::BAKED_VERSION
expect(user_profile.bio_cooked).to eq("<p>test</p>")
expect(user_profile.bio_cooked_version).to eq(UserProfile::BAKED_VERSION)
end
end
@@ -34,7 +34,7 @@ describe UserProfile do
it "doesn't support really long bios" do
user_profile = Fabricate.build(:user_profile_long)
user_profile.should_not be_valid
expect(user_profile).not_to be_valid
end
describe 'after save' do
@@ -65,7 +65,7 @@ describe UserProfile do
end
it 'should markdown the raw_bio and put it in cooked_bio' do
user.user_profile.bio_cooked.should == "<p><strong>turtle power!</strong></p>"
expect(user.user_profile.bio_cooked).to eq("<p><strong>turtle power!</strong></p>")
end
end