You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working on a new Rails 4.1.0.beta1 app (started as such, not upgraded from a previous version), using Ruby 2.1.0, and Spork is giving me some issues.
From my Gemfile.lock, I'm using spork-rails (4.0.0) together with guard (2.4.0), guard-rspec (4.2.6), guard-spork (1.5.1) and rspec (2.14.1).
When I update a model spec and save the changes, it runs correctly (the latest version of said tests is run), but whenever I edit a model and save, Guard detects the change and runs RSpec, but the tests are run against the old version of the code. The code doesn't seem to get reloaded unless I manually restart Spork (which goes against its entire purpose).
In config/environments/test.rb I have the following two settings:
These are the default settings that I never changed in any of the other Rails 4.0.0 stable projects, but even when changing them I don't get any significant changes in Spork's behavior.
And the following tests in spec/models/users_spec.rb:
require'spec_helper'describeUserdolet(:user){create(:user)}subject{user}describe"with an invalid username"doit"should be invalid"doinvalid_usernames=["","john/doe","john&doe","john@doe","john^doe","-john","_john",".john","john doe"]invalid_usernames.eachdo |invalid_username|
user.username=invalid_usernameuser.should_notbe_validendendenddescribe"with a valid username"doit"should be valid"dovalid_usernames=["john_doe","john.doe","john-doe","john-doe123","j","1337doe","1-2-3"]valid_usernames.eachdo |valid_username|
user.username=valid_usernameuser.shouldbe_validendendendend
These tests pass correctly when run, but as soon as I make any change in the model that would obviously stop the tests from passing, such as validates :username, presence: true, format: { with: /\A\z/ }, Guard will detect the change, re-run the tests and they'll still be passing, making it seem like the code has not been reloaded by Spork.
This might be a problem caused by a change in Rails 4.1.0.beta1, because I never encountered this when using other stable versions of Rails.
I'll be trying to downgrade the app I'm working on to see if I can reproduce this issue, also because I need to proceed and this problem is currently making my workflow harder.
The text was updated successfully, but these errors were encountered:
I've been downgrading my application to Rails 4 and I'm still encountering this problem. Right now, Spork doesn't seem to be reloading application_helper.rb.
I've been working on a new Rails
4.1.0.beta1
app (started as such, not upgraded from a previous version), using Ruby2.1.0
, and Spork is giving me some issues.From my
Gemfile.lock
, I'm usingspork-rails (4.0.0)
together withguard (2.4.0)
,guard-rspec (4.2.6)
,guard-spork (1.5.1)
andrspec (2.14.1)
.When I update a model spec and save the changes, it runs correctly (the latest version of said tests is run), but whenever I edit a model and save, Guard detects the change and runs RSpec, but the tests are run against the old version of the code. The code doesn't seem to get reloaded unless I manually restart Spork (which goes against its entire purpose).
In
config/environments/test.rb
I have the following two settings:These are the default settings that I never changed in any of the other Rails
4.0.0
stable projects, but even when changing them I don't get any significant changes in Spork's behavior.Here is a practical example of this issue.
I have a simple
User
model:And the following tests in
spec/models/users_spec.rb
:These tests pass correctly when run, but as soon as I make any change in the model that would obviously stop the tests from passing, such as
validates :username, presence: true, format: { with: /\A\z/ }
, Guard will detect the change, re-run the tests and they'll still be passing, making it seem like the code has not been reloaded by Spork.This might be a problem caused by a change in Rails
4.1.0.beta1
, because I never encountered this when using other stable versions of Rails.I'll be trying to downgrade the app I'm working on to see if I can reproduce this issue, also because I need to proceed and this problem is currently making my workflow harder.
The text was updated successfully, but these errors were encountered: