Permalink
Browse files

I forgot to add ! method to Capybara::JSON

  • Loading branch information...
1 parent 125a5d1 commit d2fec8a8fd2d20ff31593557515be59e535b0a7c @okitan committed Jan 26, 2012
Showing with 8 additions and 5 deletions.
  1. +4 −0 CHANGELOG.md
  2. +0 −1 Gemfile
  3. +2 −2 lib/capybara/json.rb
  4. +2 −2 spec/capybara/json_spec.rb
View
@@ -1,3 +1,7 @@
+## 0.1.2
+* BUGFIX
+ * I forgot to add get! etc to Capybara::DSL
+
## 0.1.1
* ENHANCEMENT
* get!, post!, put!, delete!
View
@@ -1,5 +1,4 @@
source "http://rubygems.org"
# Specify your gem's dependencies in capybara-json.gemspec
-gem 'capybara', '> 1.0.0'
gemspec
View
@@ -14,15 +14,15 @@ def self.included(base)
base.extend(self)
end
- %w[ get delete ].each do |method|
+ %w[ get get! delete delete! ].each do |method|
module_eval %{
def #{method}(path, params = {}, env = {})
page.driver.#{method}(path, params, env)
end
}
end
- %w[ post put ].each do |method|
+ %w[ post post! put put! ].each do |method|
module_eval %{
def #{method}(path, json, env = {})
page.driver.#{method}(path, json, env)
@@ -20,14 +20,14 @@
Capybara.current_driver = Capybara.default_driver
end
- %w[ get delete ].each do |method|
+ %w[ get get! delete delete! ].each do |method|
it "register #{method}" do
__send__(method, '/')
body.should == { 'Hello world!' => 'Hello world!' }
end
end
- %w[ post put ].each do |method|
+ %w[ post post! put put! ].each do |method|
it "register #{method}" do
__send__(method, '/', {})
body.should == { 'Hello world!' => 'Hello world!' }

0 comments on commit d2fec8a

Please sign in to comment.