Comments (7)
Should be the default behavior, did you try with --style rspec
/ --style rspec2
?
from autotest.
I have two spec files inside spec/.
- user_spec
- login_spec
When I do changes inside user_spec nothing happens.
When I do changes in login_spec the tests inside that file get executed.
.autotest
require "autotest/bundler"
require 'autotest/growl'
require 'autotest/fsevent'
require "autotest/restart"
Autotest::Growl::one_notification_per_run = true
Autotest::Growl::remote_notification = true
Autotest.add_hook :initialize do |autotest|
%w{.git .DS_Store tmp log}.each do |exception|
autotest.add_exception(exception)
end
end
# Override autotest default magic to rerun all tests every time a
# change is detected on the file system.
class Autotest
def get_to_green
begin
rerun_all_tests
wait_for_changes unless all_good
end until all_good
end
end
login_spec.rb
require_relative '../spec_helper'
describe "Login" do
describe "A user" do
describe "should be able to log in" do
it "and then see the home page" do
pending()
visit('/')
within("#menu") do
page.should have_content('Nottion')
end
end
end
end
end
user_spec.rb
require_relative '../spec_helper'
describe "As an User" do
describe "when I access the home page" do
describe "if am not authenticated" do
it "I should not see the home page" do
pending()
visit '/'
page.should_not have_selector('#menu')
end
it "I should be redirected to the login page" do
pending()
visit '/'
end
end
end
end
Output:
davinci git:(master) ✗ bundle exec autotest --style rspec2
loading autotest/rspec2
--------------------------------------------------------------------------------
bundle exec /Users/Nerian/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby -S /Users/Nerian/.rvm/gems/ruby-1.9.3-rc1@davinci/gems/rspec-core-2.6.4/bin/rspec --tty '/Users/Nerian/Projects/davinci/spec/acceptance/user_spec.rb'
**
Pending:
As an User when I access the home page if am not authenticated I should not see the home page
# No reason given
# ./spec/acceptance/user_spec.rb:6
As an User when I access the home page if am not authenticated I should be redirected to the login page
# No reason given
# ./spec/acceptance/user_spec.rb:12
Finished in 0.00084 seconds
2 examples, 0 failures, 2 pending
from autotest.
no idea :<
from autotest.
I removed this from .autotest and everything worked as expected :)
Autotest.add_hook :initialize do |autotest|
%w{.git .DS_Store tmp log}.each do |exception|
autotest.add_exception(exception)
end
end
I don't understand why that causes any problem, though.
from autotest.
seems like the matchin is roken, can you pinpoint it to any of %w{.git .DS_Store tmp log} ?
from autotest.
Seems that log
is the troublemaker
from autotest.
thats kind of weird... are you brave enough to go poke in the code, so this gets fixed for good ? :)
from autotest.
Related Issues (20)
- rails3 ruby1.9.2-p0 errors HOT 6
- Autotest doesn't work with the new way to require spec_helper in RSpec specs HOT 2
- Feature: parallel specs HOT 31
- autotest-rails-pure should require autotest HOT 3
- Start parallel_test from curent directory HOT 1
- 'C:' is not recognized as an internal or external command, (Windows Vista) HOT 6
- [Windows] autotest-standalone-4.5.2/lib/unit_diff.rb:77:in `write': Invalid argument (Errno::EINVAL) HOT 12
- Specifying the -n option on mac 10.6.6 HOT 2
- Encoding UTF-8 Error HOT 1
- Tests get run twice HOT 2
- Autotest doesn't respond to Ctrl-C HOT 15
- Autotest / spork ? HOT 4
- History.txt not updated. HOT 1
- Doesn't work in Windows... HOT 1
- Question regarding the usage tip HOT 4
- Autotest delays a little bit with fsevent HOT 5
- Won't run, complains about missing require HOT 8
- No tests matched ...(every test)... HOT 2
- Does not run model tests! HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autotest.