capybara-culerity 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ *.gem
2
+ .bundle
3
+ .rvmrc
4
+ Gemfile.lock
5
+ pkg/*
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --tty
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in capybara-culerity.gemspec
4
+ gemspec
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "capybara/culerity/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "capybara-culerity"
7
+ s.version = Capybara::Culerity::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Gabriel Sobrinho"]
10
+ s.email = ["gabriel.sobrinho@gmail.com"]
11
+ s.homepage = "https://github.com/sobrinho/capybara-culerity"
12
+ s.summary = %q{Capybara driver for culerity}
13
+ s.description = %q{Capybara driver for culerity}
14
+
15
+ s.files = `git ls-files`.split("\n")
16
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
+ s.require_paths = ["lib"]
19
+
20
+ s.add_dependency "capybara", ">= 0.4.1"
21
+ s.add_dependency "culerity", ">= 0.2.4"
22
+ s.add_dependency "capybara-celerity", ">= 0.0.1"
23
+
24
+ s.add_development_dependency "rspec", "~> 2.5"
25
+ s.add_development_dependency "sinatra", "~> 1.0"
26
+ end
@@ -0,0 +1,3 @@
1
+ require 'capybara'
2
+ require 'capybara/culerity/version'
3
+ require 'capybara/driver/culerity'
@@ -0,0 +1,5 @@
1
+ module Capybara
2
+ module Culerity
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,25 @@
1
+ require 'culerity'
2
+ require 'capybara/driver/celerity'
3
+
4
+ class Capybara::Driver::Culerity < Capybara::Driver::Celerity
5
+ def self.server
6
+ unless @_server
7
+ @_server = ::Culerity::run_server
8
+ at_exit do
9
+ @_server.close
10
+ end
11
+ end
12
+ @_server
13
+ end
14
+
15
+ def browser
16
+ unless @_browser
17
+ @_browser = ::Culerity::RemoteBrowserProxy.new self.class.server, options
18
+ at_exit do
19
+ @_browser.close
20
+ @_browser.exit
21
+ end
22
+ end
23
+ @_browser
24
+ end
25
+ end
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+ require 'capybara/spec/driver'
3
+
4
+ describe Capybara::Driver::Culerity do
5
+ before(:all) do
6
+ @driver = Capybara::Driver::Culerity.new(TestApp)
7
+ end
8
+
9
+ it_should_behave_like "driver"
10
+ it_should_behave_like "driver with javascript support"
11
+ it_should_behave_like "driver with header support"
12
+ it_should_behave_like "driver with status code support"
13
+ it_should_behave_like "driver with cookies support"
14
+ end
@@ -0,0 +1,27 @@
1
+ require 'spec_helper'
2
+ require 'capybara/spec/session'
3
+
4
+ describe Capybara::Session do
5
+ context 'with culerity driver' do
6
+ before(:all) do
7
+ @session = Capybara::Session.new(:culerity, TestApp)
8
+ end
9
+
10
+ describe '#driver' do
11
+ it "should be a culerity driver" do
12
+ @session.driver.should be_an_instance_of(Capybara::Driver::Culerity)
13
+ end
14
+ end
15
+
16
+ describe '#mode' do
17
+ it "should remember the mode" do
18
+ @session.mode.should == :culerity
19
+ end
20
+ end
21
+
22
+ it_should_behave_like "session"
23
+ it_should_behave_like "session with javascript support"
24
+ it_should_behave_like "session with headers support"
25
+ it_should_behave_like "session with status code support"
26
+ end
27
+ end
@@ -0,0 +1,15 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+ require 'capybara/culerity'
4
+
5
+ alias :running :lambda
6
+
7
+ Capybara.default_wait_time = 0
8
+
9
+ RSpec.configure do |config|
10
+ config.before do
11
+ Capybara.configure do |config|
12
+ config.default_selector = :xpath
13
+ end
14
+ end
15
+ end
metadata ADDED
@@ -0,0 +1,142 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capybara-culerity
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - Gabriel Sobrinho
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2011-03-08 00:00:00 -03:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: capybara
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ - 4
30
+ - 1
31
+ version: 0.4.1
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: culerity
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
+ - 2
44
+ - 4
45
+ version: 0.2.4
46
+ type: :runtime
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
49
+ name: capybara-celerity
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ segments:
56
+ - 0
57
+ - 0
58
+ - 1
59
+ version: 0.0.1
60
+ type: :runtime
61
+ version_requirements: *id003
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec
64
+ prerelease: false
65
+ requirement: &id004 !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ segments:
70
+ - 2
71
+ - 5
72
+ version: "2.5"
73
+ type: :development
74
+ version_requirements: *id004
75
+ - !ruby/object:Gem::Dependency
76
+ name: sinatra
77
+ prerelease: false
78
+ requirement: &id005 !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ segments:
83
+ - 1
84
+ - 0
85
+ version: "1.0"
86
+ type: :development
87
+ version_requirements: *id005
88
+ description: Capybara driver for culerity
89
+ email:
90
+ - gabriel.sobrinho@gmail.com
91
+ executables: []
92
+
93
+ extensions: []
94
+
95
+ extra_rdoc_files: []
96
+
97
+ files:
98
+ - .gitignore
99
+ - .rspec
100
+ - Gemfile
101
+ - Rakefile
102
+ - capybara-culerity.gemspec
103
+ - lib/capybara/culerity.rb
104
+ - lib/capybara/culerity/version.rb
105
+ - lib/capybara/driver/culerity.rb
106
+ - spec/driver/culerity_driver_spec.rb
107
+ - spec/session/culerity_session_spec.rb
108
+ - spec/spec_helper.rb
109
+ has_rdoc: true
110
+ homepage: https://github.com/sobrinho/capybara-culerity
111
+ licenses: []
112
+
113
+ post_install_message:
114
+ rdoc_options: []
115
+
116
+ require_paths:
117
+ - lib
118
+ required_ruby_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ segments:
123
+ - 0
124
+ version: "0"
125
+ required_rubygems_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ segments:
130
+ - 0
131
+ version: "0"
132
+ requirements: []
133
+
134
+ rubyforge_project:
135
+ rubygems_version: 1.3.6
136
+ signing_key:
137
+ specification_version: 3
138
+ summary: Capybara driver for culerity
139
+ test_files:
140
+ - spec/driver/culerity_driver_spec.rb
141
+ - spec/session/culerity_session_spec.rb
142
+ - spec/spec_helper.rb