Thomas Walpole
07e7777425
frozen literal magic comment
2016-03-07 16:52:19 -08:00
David Rodríguez
e8b6089426
Remove unnecessary requires
...
"capybara/dsl.rb" already requires "capybara.rb"
2015-12-11 10:42:09 +01:00
Joshua Clayton
08a200b138
Allow RSpec view specs to leverage Capybara matchers
...
Capybara provides a number of helpful matchers for asserting against a
DOM structure with various selectors. RSpec's view specs focus on
asserting against specific markup; this change ensures this is easier
to do.
RSpec.describe "todos/show.html.erb", type: :view do
it "displays the todo title" do
assign :todo, Todo.new(title: "Buy milk")
render
# without Capybara matchers - potentially ambiguous, doesn't
# test markup, only raw text rendered
expect(rendered).to contain "Buy milk"
# with Capybara matchers
expect(rendered).to have_css("header h1", text: "Buy milk")
end
end
2015-06-05 14:46:32 -04:00
Thomas Walpole
096c1fe832
Don't force expose_dsl_globally=false
...
Don't force expose_dsl_globally=false on driver maintainers
2014-04-03 12:47:40 -07:00
Thomas Walpole
85e9fcd7f2
fix feature definition in case user has RSpec set not to expose dsl globally - test in rspec 3 beta tests
2014-04-03 10:25:03 -07:00
Thomas Walpole
ba37f78692
Update all tests to "expect" format and add support for RSpec 3 usage
...
Swap from :skip to :capybara_skip since :skip is now used by RSpec 3
Add rspec 3 testing to beta gemfile
2014-04-02 14:33:26 -07:00
Thomas Holmes
61cddbe338
Update RSpec config to support RSpec 2 and RSpec 3.
2013-07-23 09:13:52 -04:00
Jonas Nicklas
899f3bd1f5
Revert "Merge pull request #1123 from thomas-holmes/update-rspec-configuration"
...
This reverts commit c074fe1070
, reversing
changes made to 61524b0fd3
.
2013-07-21 23:56:21 +02:00
Thomas Holmes
0dfc56440c
Fix accidental editing error
2013-07-21 00:11:46 -04:00
Thomas Holmes
6f04b04b53
Correct reference to wrong block variable name
2013-07-20 15:27:28 -04:00
Thomas Holmes
2a95252f8a
Make Rspec 3 compliant
...
Change explicit use of `example` variable to using the block value that
is passed in to examples and before/after hooks.
2013-07-20 14:09:51 -04:00
Carlos Antonio da Silva
9c1dd623f1
Move the RackTest driver override to capybara/rails
...
This change enables the `:respect_data_method` option from the RackTest
driver for Rails projects that don't use RSpec.
2012-11-15 11:20:48 -02:00
Jonas Nicklas
de34c63835
set rspec type to :feature instead
2012-09-07 20:18:20 +02:00
Jo Liss
8eb4245567
Make :respect_data_method default to true with capybara/rails
2012-08-21 15:47:24 +02:00
Jonas Nicklas
31f1ac3ccb
Separate DSL out into a module
...
Otherwise we were including a lot of classes in
the namespace of the object that Capybara was
being included in. This could lead to clashes with
some common class names.
2011-04-11 06:58:42 +01:00
Jonas Nicklas and Nicklas Ramhöj
f4897f890d
Added DSL for acceptance tests in RSpec
2011-02-11 14:44:58 +01:00
Jonas Nicklas and Nicklas Ramhöj
f5552dfe42
Move matchers into folder
2011-02-11 14:06:39 +01:00
Jo Liss
558e7b2d4d
Use the :request type for RSpec example groups
2011-02-07 17:53:32 +01:00
Jonas Nicklas
6fea34cff8
Make RSpec matchers work with session and nodes
...
Also split RSpec matchers into separate file, so
they can be used with cucumber.
2011-02-04 16:37:03 +01:00
David Chelimsky
66dcafc3c7
add have_css and have_xpath matchers
2011-02-04 16:37:02 +01:00
David Chelimsky
1e7c79ffc0
initial stab at have_selector matcher for Strings
2011-02-04 16:37:02 +01:00
Jonas Nicklas
bdde00afd7
Only mix in Capybara into :type => :acceptance examples
2011-01-09 13:57:41 +01:00
Jonas Nicklas
7abde0226c
Correct module name for RSpec, prevent deprecation warnings
2010-12-21 16:25:25 +01:00
Anders Törnqvist
aa46894ce7
Add RSpec support in Capybara itself, closes #187
...
Just the basics of including Capybara and setting
up some metadata to switch between drivers.
2010-12-10 14:54:46 +01:00