capybara-json 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.pryrc ADDED
@@ -0,0 +1,3 @@
1
+ require "bundler/setup"
2
+
3
+ require "capybara/json"
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.2
2
+ * BUGFIX
3
+ * rack_test_json works POST, PUT, DELETE as well (thanks to @sonots)
4
+
1
5
  ## 0.2.1
2
6
  * ENHANCEMENT
3
7
  * options to switch redirect
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # capybara-json [![Build Status](https://secure.travis-ci.org/okitan/capybara-json.png?branch=master)](http://travis-ci.org/okitan/capybara-json)
1
+ # capybara-json [![Build Status](https://secure.travis-ci.org/okitan/capybara-json.png?branch=master)](http://travis-ci.org/okitan/capybara-json) [![Dependency Status](https://gemnasium.com/okitan/capybara-json.png)](https://gemnasium.com/okitan/capybara-json)
2
2
 
3
3
  testing ruby: 1.9.2, 1.9.3 and ruby-head; Capybara: < 1.0 and > 1.0
4
4
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -13,7 +13,7 @@ module Capybara::RackTestJson
13
13
  %w[ get post put delete ].each do |method|
14
14
  module_eval %{
15
15
  def #{method}(uri, params = {}, env = {}, &block)
16
- env.merge(:method => "#{method.upcase}", :params => params)
16
+ env = env.merge(:method => "#{method.upcase}", :params => params)
17
17
  if options[:follow_redirect]
18
18
  request_with_follow_redirect(uri, env, &block)
19
19
  else
@@ -69,6 +69,11 @@ end
69
69
  @driver.body['content_type'].should =~ %r"^application/json"
70
70
  end
71
71
 
72
+ it "should actualy #{method}" do
73
+ @driver.__send__(method, '/env', {})
74
+ @driver.body["request_method"].should == method.upcase
75
+ end
76
+
72
77
  it 'should set content length' do
73
78
  json = { :some => :args }
74
79
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-14 00:00:00.000000000 Z
12
+ date: 2012-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capybara
@@ -195,8 +195,8 @@ extensions: []
195
195
  extra_rdoc_files: []
196
196
  files:
197
197
  - .gitignore
198
+ - .pryrc
198
199
  - .rbenv-gemsets
199
- - .rspec
200
200
  - .rvmrc
201
201
  - .rvmrc.capybara.lt.1.0
202
202
  - .travis.yml
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- -c
2
- -t wip