diff --git a/spec/integration/rails/app/controllers/fields_controller.rb b/spec/integration/rails/app/controllers/fields_controller.rb new file mode 100644 index 0000000..454f153 --- /dev/null +++ b/spec/integration/rails/app/controllers/fields_controller.rb @@ -0,0 +1,4 @@ +class FieldsController < ApplicationController + def show + end +end diff --git a/spec/integration/rails/app/helpers/fields_helper.rb b/spec/integration/rails/app/helpers/fields_helper.rb new file mode 100644 index 0000000..3be7aea --- /dev/null +++ b/spec/integration/rails/app/helpers/fields_helper.rb @@ -0,0 +1,2 @@ +module FieldsHelper +end diff --git a/spec/integration/rails/app/views/fields/show.html.erb b/spec/integration/rails/app/views/fields/show.html.erb new file mode 100644 index 0000000..afff7ad --- /dev/null +++ b/spec/integration/rails/app/views/fields/show.html.erb @@ -0,0 +1,8 @@ +

Webrat Fields Page

+

Filling In

+ \ No newline at end of file diff --git a/spec/integration/rails/config/routes.rb b/spec/integration/rails/config/routes.rb index f08763b..43b55f7 100644 --- a/spec/integration/rails/config/routes.rb +++ b/spec/integration/rails/config/routes.rb @@ -1,6 +1,7 @@ ActionController::Routing::Routes.draw do |map| map.resource 'links', :only => [:show] map.resource 'buttons', :only => [:show, :create] + map.resource 'fields', :only => [:show] map.with_options :controller => "webrat" do |webrat| webrat.submit "/submit", :action => "submit" webrat.internal_redirect "/internal_redirect", :action => "internal_redirect" diff --git a/spec/integration/rails/test/functional/buttons_controller_test.rb b/spec/integration/rails/test/functional/buttons_controller_test.rb deleted file mode 100644 index e61daec..0000000 --- a/spec/integration/rails/test/functional/buttons_controller_test.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'test_helper' - -class ButtonsControllerTest < ActionController::TestCase - # Replace this with your real tests. - test "the truth" do - assert true - end -end diff --git a/spec/integration/rails/test/functional/links_controller_test.rb b/spec/integration/rails/test/functional/links_controller_test.rb deleted file mode 100644 index 688ee9f..0000000 --- a/spec/integration/rails/test/functional/links_controller_test.rb +++ /dev/null @@ -1,8 +0,0 @@ -require 'test_helper' - -class LinksControllerTest < ActionController::TestCase - # Replace this with your real tests. - test "the truth" do - assert true - end -end diff --git a/spec/integration/rails/test/integration/fill_in_test.rb b/spec/integration/rails/test/integration/fill_in_test.rb new file mode 100644 index 0000000..db116d9 --- /dev/null +++ b/spec/integration/rails/test/integration/fill_in_test.rb @@ -0,0 +1,20 @@ +require 'test_helper' + +class FillInTest < ActionController::IntegrationTest + test "should fill in text field by name" do + visit fields_path + fill_in "field_by_name", :with => "value" + end + test "should fill in text field by name, rails naming lh257" do + visit fields_path + fill_in "rails[naming]", :with => "value" + end + test "should fill in text field by id" do + visit fields_path + fill_in "field_by_id", :with => "value" + end + test "should fill in text field by label via id" do + visit fields_path + fill_in "FieldByLabelId", :with => "value" + end +end \ No newline at end of file