mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 15:50:13 +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
0600756bbf
commit
0f7d6f7a1d
602 changed files with 47788 additions and 29 deletions
25
vendor/plugins/rspec-rails/generators/rspec_controller/templates/controller_spec.rb
vendored
Executable file
25
vendor/plugins/rspec-rails/generators/rspec_controller/templates/controller_spec.rb
vendored
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper')
|
||||
|
||||
describe <%= class_name %>Controller do
|
||||
|
||||
<% if actions.empty? -%>
|
||||
#Delete this example and add some real ones
|
||||
<% else -%>
|
||||
#Delete these examples and add some real ones
|
||||
<% end -%>
|
||||
it "should use <%= class_name %>Controller" do
|
||||
controller.should be_an_instance_of(<%= class_name %>Controller)
|
||||
end
|
||||
|
||||
<% unless actions.empty? -%>
|
||||
<% for action in actions -%>
|
||||
|
||||
describe "GET '<%= action %>'" do
|
||||
it "should be successful" do
|
||||
get '<%= action %>'
|
||||
response.should be_success
|
||||
end
|
||||
end
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
end
|
||||
11
vendor/plugins/rspec-rails/generators/rspec_controller/templates/helper_spec.rb
vendored
Normal file
11
vendor/plugins/rspec-rails/generators/rspec_controller/templates/helper_spec.rb
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper')
|
||||
|
||||
describe <%= class_name %>Helper do
|
||||
|
||||
#Delete this example and add some real ones or delete this file
|
||||
it "should be included in the object returned by #helper" do
|
||||
included_modules = (class << helper; self; end).send :included_modules
|
||||
included_modules.should include(<%= class_name %>Helper)
|
||||
end
|
||||
|
||||
end
|
||||
12
vendor/plugins/rspec-rails/generators/rspec_controller/templates/view_spec.rb
vendored
Normal file
12
vendor/plugins/rspec-rails/generators/rspec_controller/templates/view_spec.rb
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../../spec_helper')
|
||||
|
||||
describe "/<%= class_name.underscore %>/<%= action %>" do
|
||||
before(:each) do
|
||||
render '<%= class_name.underscore %>/<%= action %>'
|
||||
end
|
||||
|
||||
#Delete this example and add some real ones or delete this file
|
||||
it "should tell you where to find the file" do
|
||||
response.should have_tag('p', %r[Find me in app/views/<%= class_name.underscore %>/<%= action %>])
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue