watir-rspec 1.1.0 → 1.1.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 486091dd91ffb4e230effc674a0b74c7bd94c940
|
4
|
+
data.tar.gz: cb0f5a7ef8d8167e8468d7a93141d7813dfc7bdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d29b9b6838170435d25c90cd301d6064c79e4c3c7b791092f58b895f679bb94f802ec42f1ca812c5ed83b89e99a8158484aba44a84f5a2e7185b3674168b4f1
|
7
|
+
data.tar.gz: ef37b4efee5d44c43a9a15cfe01ce594c766137178fcc79773adda1f763aa080a5fbdaee6c6f9d67df5a09ff7c4ddb7c9eb80ba0eb1003eaca4c10d4913ef35a
|
data/CHANGES.md
CHANGED
@@ -2,16 +2,16 @@ if Watir::RSpec.active_record_loaded?
|
|
2
2
|
require "thread"
|
3
3
|
|
4
4
|
RSpec.configuration.before(:suite) do
|
5
|
-
# Allow RSpec specs to use transactional fixtures when using Watir.
|
5
|
+
# Allow RSpec specs to use transactional fixtures when using Watir.
|
6
6
|
#
|
7
7
|
# Tip from http://blog.plataformatec.com.br/2011/12/three-tips-to-improve-the-performance-of-your-test-suite/
|
8
8
|
class ::ActiveRecord::Base
|
9
|
-
|
9
|
+
@@shared_connection_semaphore = Mutex.new
|
10
10
|
|
11
11
|
class << self
|
12
12
|
def connection
|
13
|
-
|
14
|
-
|
13
|
+
@@shared_connection_semaphore.synchronize do
|
14
|
+
@@shared_connection ||= retrieve_connection
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
data/lib/watir/rspec/version.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
class TestModel < ::ActiveRecord::Base
|
4
|
+
end
|
5
5
|
|
6
|
+
describe TestModel do
|
6
7
|
context ".connection" do
|
8
|
+
before { described_class.class_variable_set :@@shared_connection, nil }
|
9
|
+
|
7
10
|
it "reuses the connection" do
|
8
11
|
described_class.should_receive(:retrieve_connection).once.and_return(:established_connection)
|
9
12
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watir-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jarmo Pertman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|