Quantcast
Channel: Wolfmans Howlings: Using RSpec to test HAML helpers
Browsing latest articles
Browse All 10 View Live
↧

"Using RSpec to test HAML helpers" by meekish

That's very nice. I learn something new every day.

View Article


"Using RSpec to test HAML helpers" by Evgeny

One can also use automatic inclusion for haml helpers for all helper tests by editing `spec/spec_helper.rb`, like so: Spec::Runner.configure do |config| config.include Haml::Helpers config.include...

View Article


"Using RSpec to test HAML helpers" by Evgeny

Is there a way to add those include ActionView::Helpers include Haml::Helpers into spec_helper.rb ? and perhaps even the `@haml_is_haml` and `@haml_stack` .... It's kind of annoying adding those to...

View Article

"Using RSpec to test HAML helpers" by wolfmanjm

Thanks I wasn't sure that ` have_tag` would work, but its good to know thats an option.

View Article

"Using RSpec to test HAML helpers" by Evgeny

Ohh... I actually just used : before(:each) do @haml_is_haml = true @haml_stack = [Haml::Buffer.new(:attr_wrapper =>"'")] end because I have more haml helpers to test than just one.

View Article


"Using RSpec to test HAML helpers" by Evgeny

it "should display flash" do for name in [ :notice, :warning, :error ] flash[name]= "flash #{name.to_s} message" capture_haml { display_flash }.should have_tag "div.#{name.to_s}", 1, :text =>...

View Article

"Using RSpec to test HAML helpers" by wolfmanjm

Yes that is where I put it. I'm not aware of a place for those helpers, but if you find one let me know :)

View Article

"Using RSpec to test HAML helpers" by Evgeny

I guess the file you will put that in will be spec/helpers/application_spec.rb Because you, and http://rspec.rubyforge.org/documentation/rails/writing/helpers.html don't specify the file naming. I took...

View Article


Using RSpec to test HAML helpers

UPDATED for HAML 2.0 and RSpec 1.1.5 - Changed open to haml_tag, prefix helper. to all rspec calls...The most recent release of HAML introduced a neat feature that allows you to use HAML-like syntax in...

View Article


"Using RSpec to test HAML helpers" by Len Wholey

Thank you!

View Article
Browsing latest articles
Browse All 10 View Live