public
Description: Ground-up rewrite of Beast, a Ruby on Rails forum.
Homepage: http://activereload.lighthouseapp.com/projects/7537-altered-beast/
Clone URL: git://github.com/courtenay/altered_beast.git
Whups, we want rspec-crack
courtenay (author)
Wed Oct 08 19:32:20 -0700 2008
commit  003e0485cc997184e0bc83e726b99e2e1260d202
tree    b9ea6c73dbfe43c5c88f54098782437b12c96866
parent  b170c55bee6c1edaa4587179f53c9a10d4259945
...
18
19
20
21
 
 
22
23
24
...
420
421
422
423
 
424
425
426
...
18
19
20
 
21
22
23
24
25
...
421
422
423
 
424
425
426
427
0
@@ -18,7 +18,8 @@ module RspecOnRailsOnCrack
0
         describe @controller, "access for #{user.inspect}", :type => :controller do
0
           ControllerAccessGroup.new(self, blocks, filters).instance_eval(&block)
0
           before do
0
- controller.stub!(:current_user).and_return(user == :anon ? :false : users(user))
0
+ controller.stub!(:current_user).and_return(user == :anon ? nil : users(user))
0
+ controller.stub!(:logged_in?).and_return(user != :anon)
0
           end
0
         end
0
       end
0
@@ -420,7 +421,7 @@ module RspecOnRailsOnCrack
0
         acting do |response|
0
           asserts_status options[:status]
0
           asserts_content_type options[:format] || format
0
- response.should have_text(instance_eval(&block)) if block
0
+ response.should have_text(block.call) if block
0
         end
0
       end
0
     end

Comments

    No one has commented yet.