cavalle / steak

DISCONTINUED - The delicious combination of RSpec and Capybara for Acceptance BDD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rspec tasks are loaded twice causing specs to run twice

mguterl opened this issue · comments

When I run any of the rspec-rails provided rake tasks, the specs run twice.

$ rake spec:models
(in /Users/michaelguterl/code/rm/board)
...................................................................................................................................................................................................................
Finished in 10.182159 seconds
211 examples, 0 failures
...................................................................................................................................................................................................................
Finished in 9.191841 seconds
211 examples, 0 failures

line 1 of steak.rake is

load File.dirname(__FILE__) + '/rspec.rake'

Unfortunately load will always load the file even if it is loaded already. In the case of my particular application it appears that the rspec.rake task has been loaded by the time steak.rake is evaluated. Removing line 1 of steak.rake fixes my issues and rake spec:acceptance continues to work.

Interesting. Are you using v0.3.x (rails 2.x) or v0.4.0 (for rails 3)?

This is in v0.3.1 and Rails 2.3.5.

Removing loading of rspec.rake that causes specs to run twice. Closed by 68f62ca

Released version 0.3.8 including this fix