Permalink
Browse files

damn it, forgot to change error line after clean test codes

  • Loading branch information...
1 parent 674dc77 commit 7c67276af7b79b77d73ef68fcdeb9c8194a06571 @flyerhzm flyerhzm committed Apr 19, 2012
View
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- rails_best_practices (1.9.0)
+ rails_best_practices (1.9.1)
activesupport
awesome_print
colored
@@ -28,7 +28,7 @@ GEM
haml (3.1.3)
i18n (0.6.0)
multi_json (1.2.0)
- progressbar (0.10.0)
+ progressbar (0.11.0)
rake (0.9.2.2)
rb-fsevent (0.4.3.1)
rspec (2.7.0)
@@ -39,7 +39,7 @@ GEM
rspec-expectations (2.7.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.7.0)
- sexp_processor (3.1.0)
+ sexp_processor (3.2.0)
slim (1.0.4)
temple (~> 0.3.4)
tilt (~> 1.3.2)
@@ -18,7 +18,7 @@ def create
EOF
runner.review('app/controllers/users_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/users_controller.rb:3 - add model virtual attribute (for @user)"
+ runner.errors[0].to_s.should == "app/controllers/users_controller.rb:2 - add model virtual attribute (for @user)"
end
it "should add model virtual attribute with local assignment" do
@@ -34,7 +34,7 @@ def create
EOF
runner.review('app/controllers/users_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/users_controller.rb:3 - add model virtual attribute (for user)"
+ runner.errors[0].to_s.should == "app/controllers/users_controller.rb:2 - add model virtual attribute (for user)"
end
it "should not add model virtual attribute with differen param" do
@@ -81,7 +81,7 @@ def create
EOF
runner.review('app/controllers/users_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/users_controller.rb:3 - add model virtual attribute (for @user)"
+ runner.errors[0].to_s.should == "app/controllers/users_controller.rb:2 - add model virtual attribute (for @user)"
end
it "should no add model virtual attribute with two dimension params" do
@@ -21,8 +21,8 @@ def index
EOF
runner.review('app/controllers/posts_controller.rb', content)
runner.should have(2).errors
- runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:4 - move finder to named_scope"
- runner.errors[1].to_s.should == "app/controllers/posts_controller.rb:8 - move finder to named_scope"
+ runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:3 - move finder to named_scope"
+ runner.errors[1].to_s.should == "app/controllers/posts_controller.rb:7 - move finder to named_scope"
end
it "should not move simple finder" do
@@ -24,7 +24,7 @@ def publish
EOF
runner.review('app/controllers/posts_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:3 - move model logic into model (@post use_count > 4)"
+ runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:2 - move model logic into model (@post use_count > 4)"
end
it "should not move model logic into model with simple model calling" do
@@ -26,7 +26,7 @@ def create
EOF
runner.review('app/controllers/invoices_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/invoices_controller.rb:3 - replace complex creation with factory method (@invoice attribute_assignment_count > 2)"
+ runner.errors[0].to_s.should == "app/controllers/invoices_controller.rb:2 - replace complex creation with factory method (@invoice attribute_assignment_count > 2)"
end
it "should not replace complex creation with factory method with simple creation" do
@@ -29,7 +29,7 @@ def destroy
EOF
runner.review('app/controllers/posts_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:3,7,11,16 - use before_filter for show,edit,update,destroy"
+ runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:2,6,10,15 - use before_filter for show,edit,update,destroy"
end
it "should not use before_filter when equal to customize count" do
@@ -17,7 +17,7 @@ def create
EOF
runner.review('app/controllers/posts_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:3 - use model association (for @post)"
+ runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:2 - use model association (for @post)"
end
it "should not use model association without association assign" do
@@ -45,7 +45,7 @@ def create
EOF
runner.review('app/controllers/posts_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:3 - use model association (for post)"
+ runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:2 - use model association (for post)"
end
it "should not use model association" do
@@ -29,7 +29,7 @@ def send_create_notification
EOF
runner.review('app/models/project.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/models/project.rb:6 - use observer"
+ runner.errors[0].to_s.should == "app/models/project.rb:5 - use observer"
end
it "should not use observer without callback" do
@@ -65,7 +65,7 @@ def update_author
EOF
runner.review('app/models/project.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/models/project.rb:6 - use observer"
+ runner.errors[0].to_s.should == "app/models/project.rb:5 - use observer"
end
it "should not raise when initiate an object in callback" do
@@ -94,7 +94,7 @@ def send_create_notification
EOF
runner.review('app/models/project.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/models/project.rb:6 - use observer"
+ runner.errors[0].to_s.should == "app/models/project.rb:5 - use observer"
end
it "should not use observer without callback" do
@@ -130,7 +130,7 @@ def update_author
EOF
runner.review('app/models/project.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/models/project.rb:6 - use observer"
+ runner.errors[0].to_s.should == "app/models/project.rb:5 - use observer"
end
it "should not raise when initiate an object in callback" do
@@ -21,7 +21,7 @@ def edit
EOF
runner.review('app/controllers/posts_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:6 - use scope access"
+ runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:5 - use scope access"
end
it "shoud use scope access by comparing with id" do
@@ -39,7 +39,7 @@ def edit
EOF
runner.review('app/controllers/posts_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:6 - use scope access"
+ runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:5 - use scope access"
end
it "shoud use scope access with current_user ==" do
@@ -57,7 +57,7 @@ def edit
EOF
runner.review('app/controllers/posts_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:6 - use scope access"
+ runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:5 - use scope access"
end
it "shoud use scope access by current_user.id ==" do
@@ -75,7 +75,7 @@ def edit
EOF
runner.review('app/controllers/posts_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:6 - use scope access"
+ runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:5 - use scope access"
end
end
@@ -95,7 +95,7 @@ def edit
EOF
runner.review('app/controllers/posts_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:6 - use scope access"
+ runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:5 - use scope access"
end
it "shoud use scope access by comparing with id" do
@@ -113,7 +113,7 @@ def edit
EOF
runner.review('app/controllers/posts_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:6 - use scope access"
+ runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:5 - use scope access"
end
it "shoud use scope access with current_user ==" do
@@ -131,7 +131,7 @@ def edit
EOF
runner.review('app/controllers/posts_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:6 - use scope access"
+ runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:5 - use scope access"
end
it "shoud use scope access by current_user.id ==" do
@@ -149,7 +149,7 @@ def edit
EOF
runner.review('app/controllers/posts_controller.rb', content)
runner.should have(1).errors
- runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:6 - use scope access"
+ runner.errors[0].to_s.should == "app/controllers/posts_controller.rb:5 - use scope access"
end
it "should no error in use_scope_access_review" do

0 comments on commit 7c67276

Please sign in to comment.