Created
September 24, 2008 09:31
-
-
Save timurvafin/12516 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.dirname(__FILE__) + '/../spec_helper' | |
describe ApplicationHelper do | |
include ApplicationHelper | |
it 'helper setup instance variable' do | |
helper.setup_instance_var('test') | |
assigns['test_value'].should == 'test' | |
end | |
end | |
module ApplicationHelper | |
def setup_instance_var(value) | |
@test_value = value | |
end | |
end | |
> ./script/spec -fs -c ./spec/helpers/test_helper_spec.rb | |
ApplicationHelper | |
- helper setup instance variable (FAILED - 1) | |
1) | |
'ApplicationHelper helper setup instance variable' FAILED | |
expected: "test", | |
got: nil (using ==) | |
./spec/helpers/test_helper_spec.rb:8: | |
./script/spec:4: | |
Finished in 0.255222 seconds | |
1 example, 1 failure | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment