splinter 0.0.8 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4a32fc8fdf603849cedc22a647f6bc8772bd9437
4
- data.tar.gz: 0a796f046cf187c7cd907670f669fd82f32b57c5
3
+ metadata.gz: b7f9a91d2107588dae76e0904e8c5c27b5a4649e
4
+ data.tar.gz: def9ed48cc1a20aa7bb5269793cb915dee364e68
5
5
  SHA512:
6
- metadata.gz: 49d47dce8d3cc4e97faf72d66385f0c8c372fe9fc997032abd24109c85ba43101696437d1cbb8daa4e5528a8c17a00eea7f5258dba000ac996686e294862e6cd
7
- data.tar.gz: f9df7cc282727cf1b00c2d48994d96ba704bc0e35465d183038f357714eaaebd28046ce846f7026c5e13c86dc2300245ca8cef2a6733344d8f3c08fc00ca8906
6
+ metadata.gz: 7d24c3bc71bb5cde5028a084d3f50ffd5354d8bec53ec543e7875e46dc0e19d7c433a305668c7ae89d78c3fee4e04de62f9e257eca2a53eae3214b2647205b55
7
+ data.tar.gz: db71ccb0aeaacbf25ec50b9c1f02a451b89aa70beb0d25703dd3c7b8ea533d4bf96f22df7f93471ca77ebdbaf0b01fbade572c121180742b7e1bef271e354553
@@ -107,13 +107,10 @@ module Splinter
107
107
  # select_id - CSS ID to check, do *not* include #
108
108
  # value - The value to select.
109
109
  def find_and_select_option(select_id, value)
110
- select_err = "cannot select option, no select box with id '##{select_id}' found"
111
- option_err = "cannot select option, no option with text '#{value}' in select box '##{select_id}'"
112
-
113
- select = find(:css, "##{select_id}", :message => select_err)
110
+ select = find(:css, "##{select_id}")
114
111
  path = ".//option[contains(./@value, '#{value}')]"
115
112
 
116
- select.find(:xpath, path, :message => option_err).select_option
113
+ select.find(:xpath, path).select_option
117
114
  end
118
115
 
119
116
  # Simulates a javascript alert confirmation. You need to pass in a block that will
@@ -145,17 +142,12 @@ module Splinter
145
142
  raise ArgumentError, "You must supply either :from or :id_prefix option"
146
143
  end
147
144
 
148
- select_prefix = options[:id_prefix]
149
- select_prefix ||= find_prefix_by_label(options[:from])
150
-
151
- select_prefix
145
+ options[:id_prefix] || find_prefix_by_label(options[:from])
152
146
  end
153
147
 
154
148
  def find_prefix_by_label(label)
155
- message = "cannot select option, select with label '#{label}' not found"
156
- path = "//label[contains(normalize-space(string(.)), '#{label}')]/@for"
157
-
158
- find(:xpath, path, :message => message).text.sub(/_\di$/, '')
149
+ path = "//label[contains(normalize-space(string(.)), '#{label}')]/@for"
150
+ find(:xpath, path).text(:all).sub(/_\di$/, '')
159
151
  end
160
152
  end
161
153
  end
@@ -1,9 +1,9 @@
1
1
  require "splinter/capybara"
2
2
 
3
3
  RSpec.configure do |config|
4
- config.include Splinter::Capybara::Actions, :type => :request
4
+ config.include Splinter::Capybara::Actions, :type => :feature
5
5
 
6
- config.after :each, :type => :request do
6
+ config.after :each, :type => :feature do
7
7
  take_screenshot! if Splinter.screenshot_directory &&
8
8
  example.exception && example.metadata[:js]
9
9
 
@@ -1,3 +1,3 @@
1
1
  module Splinter
2
- VERSION = Version = '0.0.8'
2
+ VERSION = Version = '0.1.0'
3
3
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
  require 'test_app/server'
3
3
  require 'rack/test'
4
4
 
5
- describe Splinter, :type => :request do
5
+ describe Splinter, :type => :feature do
6
6
  include Rack::Test::Methods
7
7
 
8
8
  def time
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: splinter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Priddle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-09 00:00:00.000000000 Z
11
+ date: 2013-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 1.1.4
19
+ version: 2.1.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: 1.1.4
26
+ version: 2.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 2.10.0
33
+ version: 2.13.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: 2.10.0
40
+ version: 2.13.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: sinatra
43
43
  requirement: !ruby/object:Gem::Requirement