[rspec-users] Calling let(:something) from before blocks?

2010-11-06 Thread Christoph Schiessl
Hello! I find myself repeating the same `let(:something)` statements over and over again in different view examples. Therefore, I wonder if it's possible to define these globally in the spec_helper.rb file. I came up with the following approach: # spec/spec_helper.rb RSpec.configure do |co

[rspec-users] Custom File List for Rails 3 Spec Task

2010-11-06 Thread Scott Taylor
I have some javascript specs (using the jspec javascript framework) in my rails 3 project, living in the spec/javascript directory. How can I exclude the ruby files in the jspec project from being run when I run "rake spec"? RSpec::Core::RakeTask used to take a file list (which was usually gen

Re: [rspec-users] Custom File List for Rails 3 Spec Task

2010-11-06 Thread David Chelimsky
On Nov 6, 2010, at 5:04 PM, Scott Taylor wrote: > I have some javascript specs (using the jspec javascript framework) in my > rails 3 project, living in the spec/javascript directory. How can I exclude > the ruby files in the jspec project from being run when I run "rake spec"? > > RSpec::Core

[rspec-users] How best to intercept one method in the midst of a chain

2010-11-06 Thread Hedge Hog
Hi Group, I'm back to Rspec after some time away, and was a little curious about why the following example does not return the value zero. ​​https://gist.github.com/665226 I have tried @repo.status.__send__{type.to_sym}.size and got the same result, and I suspected the send was maybe bypassing rs

[rspec-users] Hooks before a scenario but not the background: possible or bad practice

2010-11-06 Thread Hedge Hog
Hi, I'd like to activate FakeFS for some scenarios, which I tag @fakefs, however it seems Before('@fakefs') runs before the background of the feature - unfortunately this clobbers Grit, and I can't Grit::Repo.new(...) in the backbround. Is it currently possible to get a hook to run before a scenari