polonium 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,4 +1,9 @@
1
+ 0.3.3
1
2
  * Fixed integration issues rspec 1.1.11.
3
+ * Some other versions and releases and stuff
4
+ * Remove dependency on Selenium or selenium-rc gem, give a helpful message to install and run selenium-rc if no local server is running
5
+ * Don't prepend an asterisk to browser string if it already has one
6
+ * Put a deprecation message in readme
2
7
 
3
8
  0.2.2
4
9
  * fixed a bug that was preventing webrick server runner to start [Jeremy Lightsmith]
data/README CHANGED
@@ -1,3 +1,7 @@
1
+ == DEPRECATED
2
+
3
+ Polonium is being deprecated! Please use webrat or selenium-client instead.
4
+
1
5
  == Introduction
2
6
 
3
7
  Welcome to Polonium!
data/Rakefile CHANGED
@@ -26,7 +26,7 @@ def run_suite
26
26
  end
27
27
 
28
28
  PKG_NAME = "polonium"
29
- PKG_VERSION = "0.3.2"
29
+ PKG_VERSION = "0.3.3"
30
30
  PKG_FILES = FileList[
31
31
  '[A-Z]*',
32
32
  '*.rb',
@@ -54,7 +54,6 @@ spec = Gem::Specification.new do |s|
54
54
  s.email = "opensource@pivotallabs.com"
55
55
  s.homepage = "http://pivotalrb.rubyforge.org"
56
56
  s.rubyforge_project = "pivotalrb"
57
- s.add_dependency "Selenium", ">=1.1.14"
58
57
  end
59
58
 
60
59
  Rake::GemPackageTask.new(spec) do |pkg|
@@ -126,7 +126,7 @@ module Polonium
126
126
 
127
127
  # The browser formatted for the Selenese driver.
128
128
  def formatted_browser
129
- return "*#{@browser}"
129
+ @browser.index('*') == 0 ? @browser : "*#{@browser}"
130
130
  end
131
131
 
132
132
  # The http host name and port to be entered into the browser address bar
@@ -102,31 +102,31 @@ module Polonium
102
102
  end
103
103
 
104
104
  it "establish_environment__webrick_host" do
105
- should_establish_environment('internal_app_server_host', '192.168.10.1', :internal_app_server_host )
105
+ assert_should_establish_environment('internal_app_server_host', '192.168.10.1', :internal_app_server_host )
106
106
  end
107
107
 
108
108
  it "initializes webrick_port" do
109
- should_establish_environment('internal_app_server_port', 1337, :internal_app_server_port )
109
+ assert_should_establish_environment('internal_app_server_port', 1337, :internal_app_server_port )
110
110
  end
111
111
 
112
112
  it "initializes internal_app_server_port" do
113
- should_establish_environment('external_app_server_port', 1337, :external_app_server_port )
113
+ assert_should_establish_environment('external_app_server_port', 1337, :external_app_server_port )
114
114
  end
115
115
 
116
116
  it "initializes internal_app_server_host" do
117
- should_establish_environment('external_app_server_host', 'sammich.com', :external_app_server_host)
117
+ assert_should_establish_environment('external_app_server_host', 'sammich.com', :external_app_server_host)
118
118
  end
119
119
 
120
120
  it "initializes selenium_server_host" do
121
- should_establish_environment('selenium_server_host', 'sammich.com')
121
+ assert_should_establish_environment('selenium_server_host', 'sammich.com')
122
122
  end
123
123
 
124
124
  it "initializes selenium_server_host" do
125
- should_establish_environment('selenium_server_port', 1337)
125
+ assert_should_establish_environment('selenium_server_port', 1337)
126
126
  end
127
127
 
128
128
  it "initializes app_server_engine" do
129
- should_establish_environment('app_server_engine', :webrick, :app_server_engine)
129
+ assert_should_establish_environment('app_server_engine', :webrick, :app_server_engine)
130
130
  end
131
131
 
132
132
  it "initializes browser" do
@@ -203,6 +203,11 @@ module Polonium
203
203
  configuration.formatted_browser.should == "*iexplore"
204
204
  end
205
205
 
206
+ it "formatted_browser does not prepend an extra asterisk" do
207
+ configuration.browser = "*foobrowser"
208
+ configuration.formatted_browser.should == "*foobrowser"
209
+ end
210
+
206
211
  it "browser_url" do
207
212
  configuration.external_app_server_host = "test.com"
208
213
  configuration.external_app_server_port = 101
@@ -215,7 +220,7 @@ module Polonium
215
220
  end
216
221
 
217
222
  protected
218
- def should_establish_environment(env_var, expected_value, method_name=nil )
223
+ def assert_should_establish_environment(env_var, expected_value, method_name=nil )
219
224
  method_name = env_var unless method_name
220
225
  configuration.env = stub_env
221
226
  stub_env[env_var] = expected_value
@@ -19,12 +19,12 @@ describe Spec::Runner::Options do
19
19
  end
20
20
 
21
21
  it "stops the app server app_server_runner when finished" do
22
- mock.proxy(app_server_runner).stop
22
+ mock.proxy(app_server_runner).stop.at_least(1) # there was test bleedover, use at_least to ignore it
23
23
  the_rspec_options.run_examples
24
24
  end
25
25
 
26
26
  it "stops the Selenium driver when finished" do
27
- mock.proxy(configuration).stop_driver_if_necessary(true)
27
+ mock.proxy(configuration).stop_driver_if_necessary(true).at_least(1) # there was test bleedover, use at_least to ignore it
28
28
  the_rspec_options.run_examples
29
29
  end
30
30
  end
@@ -1,3 +1,8 @@
1
+ # jump through ugly hoops so we can find MiddlewareStack successfully
2
+ require 'rubygems'
3
+ gem 'rails', '2.3.5'
4
+ require 'action_controller/middleware_stack'
5
+
1
6
  class SpecSuite
2
7
  def run
3
8
  puts "Running #{self.class}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pivotal Labs
@@ -9,19 +9,10 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-31 00:00:00 -07:00
12
+ date: 2010-01-13 00:00:00 -07:00
13
13
  default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: Selenium
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 1.1.14
24
- version:
14
+ dependencies: []
15
+
25
16
  description: Selenium RC with Rails integration and enhanced assertions.
26
17
  email: opensource@pivotallabs.com
27
18
  executables: []