GithubHelp home page GithubHelp logo

Comments (7)

grosser avatar grosser commented on July 19, 2024

Should be the default behavior, did you try with --style rspec / --style rspec2 ?

from autotest.

Nerian avatar Nerian commented on July 19, 2024

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.

grosser avatar grosser commented on July 19, 2024

no idea :<

from autotest.

Nerian avatar Nerian commented on July 19, 2024

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.

grosser avatar grosser commented on July 19, 2024

seems like the matchin is roken, can you pinpoint it to any of %w{.git .DS_Store tmp log} ?

from autotest.

Nerian avatar Nerian commented on July 19, 2024

Seems that log is the troublemaker

from autotest.

grosser avatar grosser commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.