[rspec-users] RSpec 2 view specs: partial mocks
David Chelimsky
dchelimsky at gmail.com
Sun Jun 20 18:44:17 EDT 2010
On Jun 20, 2010, at 5:18 PM, Michael Schuerig wrote:
>
> # in spec/spec_helpers.rb
> config.include PartialHelpers, :example_group => {
> :description => lambda { |description|
> # FIXME this is a kludge as there is
> # currently (rspec 2.0.0.beta.12)
> # apparently no other way to identify a view
> # example group.
> description =~ /\.html\.erb$/
> }
> }
Here's how rspec-rails-2 does it: http://github.com/rspec/rspec-rails/blob/master/lib/rspec/rails/example/view_example_group.rb#L106
More information about the rspec-users
mailing list