mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-20 09:10:12 +01:00
Added Rspec and Webrat plugins and started porting Selenium on Rails tests to Rspec Plain Text Stories driving Webrat driving Selenium.
This commit is contained in:
parent
7b432a74ed
commit
2c09db45c5
602 changed files with 47788 additions and 29 deletions
36
vendor/plugins/rspec-rails/spec/rails/autotest/mappings_spec.rb
vendored
Normal file
36
vendor/plugins/rspec-rails/spec/rails/autotest/mappings_spec.rb
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
require File.dirname(__FILE__) + '/../../spec_helper'
|
||||
require File.join(File.dirname(__FILE__), *%w[.. .. .. lib autotest rails_rspec])
|
||||
require File.join(File.dirname(__FILE__), *%w[.. .. .. .. rspec spec autotest_matchers])
|
||||
|
||||
describe Autotest::RailsRspec, "file mapping" do
|
||||
before(:each) do
|
||||
@autotest = Autotest::RailsRspec.new
|
||||
@autotest.hook :initialize
|
||||
end
|
||||
|
||||
it "should map model example to model" do
|
||||
@autotest.should map_specs(['spec/models/thing_spec.rb']).
|
||||
to('app/models/thing.rb')
|
||||
end
|
||||
|
||||
it "should map controller example to controller" do
|
||||
@autotest.should map_specs(['spec/controllers/things_controller_spec.rb']).
|
||||
to('app/controllers/things_controller.rb')
|
||||
end
|
||||
|
||||
it "should map view.rhtml" do
|
||||
@autotest.should map_specs(['spec/views/things/index.rhtml_spec.rb']).
|
||||
to('app/views/things/index.rhtml')
|
||||
end
|
||||
|
||||
it "should map view.rhtml with underscores in example filename" do
|
||||
@autotest.should map_specs(['spec/views/things/index_rhtml_spec.rb']).
|
||||
to('app/views/things/index.rhtml')
|
||||
end
|
||||
|
||||
it "should map view.html.erb" do
|
||||
@autotest.should map_specs(['spec/views/things/index.html.erb_spec.rb']).
|
||||
to('app/views/things/index.html.erb')
|
||||
end
|
||||
|
||||
end
|
||||
8
vendor/plugins/rspec-rails/spec/rails/autotest/rails_rspec_spec.rb
vendored
Normal file
8
vendor/plugins/rspec-rails/spec/rails/autotest/rails_rspec_spec.rb
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
require File.dirname(__FILE__) + '/../../spec_helper'
|
||||
require File.join(File.dirname(__FILE__), "..", "..", "..", "lib", "autotest", "rails_rspec")
|
||||
|
||||
describe Autotest::RailsRspec do
|
||||
it "should provide the correct spec_command" do
|
||||
Autotest::RailsRspec.new.spec_command.should == "script/spec"
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue