On 2008-11-24, at 00:39, Zach Dennis wrote:
Try: helper.format_utilities
Thanks everyone! I should have searched the API rather than Google.
I'll do that next time.
Cheers,
Nick
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyf
On Fri, Nov 21, 2008 at 12:18 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
> I'm trying to write specs for a helper method that I'm creating, but my
> specs are failing to find the helper method
>
> # app/helpers/properties_helper.rb
> module PropertiesHelper
> def format_utilities(utilities)
> en
On Nov 21, 2008, at 1:18 PM, Nick Hoffman wrote:
I'm trying to write specs for a helper method that I'm creating, but
my specs are failing to find the helper method
# app/helpers/properties_helper.rb
module PropertiesHelper
def format_utilities(utilities)
end
end
# spec/helpers/properties
Have a look at the change to no longer implicitly include modules:
http://blog.davidchelimsky.net/articles/2008/05/29/rspec-waving-bye-bye-to-implicit-module-inclusion
Regards,
Craig
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforg
I'm not sure what version it was, but Rails helper modules are no longer
included implicitly in helper specs. [1]
You should rewrite your spec as:
describe PropertiesHelper do
describe '#format_utilities' do
it 'should format a utilities value' do
helper.format_utilities(nil).should == '
On Fri, Nov 21, 2008 at 1:18 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
> I'm trying to write specs for a helper method that I'm creating, but my
> specs are failing to find the helper method
>
> # app/helpers/properties_helper.rb
> module PropertiesHelper
> def format_utilities(utilities)
> end
On 21 Nov 2008, at 18:18, Nick Hoffman wrote:
I'm trying to write specs for a helper method that I'm creating, but
my specs are failing to find the helper method
# app/helpers/properties_helper.rb
module PropertiesHelper
def format_utilities(utilities)
end
end
# spec/helpers/properties_he
I'm trying to write specs for a helper method that I'm creating, but
my specs are failing to find the helper method
# app/helpers/properties_helper.rb
module PropertiesHelper
def format_utilities(utilities)
end
end
# spec/helpers/properties_helper_spec.rb
require File.expand_path(File.dirn