bbq-widget 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bbq-widget.gemspec +1 -1
- data/lib/bbq-widget/version.rb +1 -1
- data/lib/bbq-widget/within_css_id.rb +17 -1
- data/test/unit/bbq_widget_test.rb +17 -1
- metadata +9 -9
data/bbq-widget.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
|
-
s.add_dependency "bbq", "~> 0.0.2.beta.
|
21
|
+
s.add_dependency "bbq", "~> 0.0.2.beta.2"
|
22
22
|
|
23
23
|
s.add_development_dependency "sqlite3", "~> 1.3.3"
|
24
24
|
end
|
data/lib/bbq-widget/version.rb
CHANGED
@@ -13,7 +13,7 @@ module Bbq
|
|
13
13
|
# if it is user or widget
|
14
14
|
def initialize(parent, css_id)
|
15
15
|
@parent = parent
|
16
|
-
self.css_id = "##{
|
16
|
+
self.css_id = "##{css_id}"
|
17
17
|
return self
|
18
18
|
end
|
19
19
|
|
@@ -48,6 +48,22 @@ module Bbq
|
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
+
def has?(*params)
|
52
|
+
see?(*params)
|
53
|
+
end
|
54
|
+
|
55
|
+
def has!(*params)
|
56
|
+
see!(*params)
|
57
|
+
end
|
58
|
+
|
59
|
+
def lacks?(*params)
|
60
|
+
not_see?(*params)
|
61
|
+
end
|
62
|
+
|
63
|
+
def lacks!(*params)
|
64
|
+
not_see!(*params)
|
65
|
+
end
|
66
|
+
|
51
67
|
end
|
52
68
|
|
53
69
|
end
|
@@ -5,6 +5,12 @@ require 'bbq-widget'
|
|
5
5
|
|
6
6
|
class BbqWidgetTest < Test::Unit::TestCase
|
7
7
|
|
8
|
+
def test_css_id
|
9
|
+
user = Bbq::TestUser.new
|
10
|
+
w = Bbq::Widget::WithinCssId.new(user, "abc")
|
11
|
+
assert_equal "#abc", w.css_id
|
12
|
+
end
|
13
|
+
|
8
14
|
def test_responsivnes
|
9
15
|
w = Bbq::Widget::WithinCssId.new(Bbq::TestUser.new, nil)
|
10
16
|
assert w.respond_to?(:see?)
|
@@ -14,7 +20,17 @@ class BbqWidgetTest < Test::Unit::TestCase
|
|
14
20
|
assert w.respond_to?(:save_page)
|
15
21
|
end
|
16
22
|
|
17
|
-
def
|
23
|
+
def test_widgets_search_in_widget_scope
|
24
|
+
user = Bbq::TestUser.new
|
25
|
+
user.visit "/"
|
26
|
+
w = Bbq::Widget::WithinCssId.new(user, "ul2li1")
|
27
|
+
assert w.has?("ul2li1")
|
28
|
+
assert w.lacks?("ul1li1")
|
29
|
+
assert_raise(FAILED_ASSERTION) { w.has!("ul1li1") }
|
30
|
+
assert_raise(FAILED_ASSERTION) { w.lacks!("ul2li1") }
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_widgets_are_properly_nesting_capybara_search_scope
|
18
34
|
user = Bbq::TestUser.new
|
19
35
|
user.visit "/"
|
20
36
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bbq-widget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,23 +9,23 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-07-01 00:00:00.000000000 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bbq
|
17
|
-
requirement: &
|
17
|
+
requirement: &76019340 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.0.2.beta.
|
22
|
+
version: 0.0.2.beta.2
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *76019340
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: sqlite3
|
28
|
-
requirement: &
|
28
|
+
requirement: &76018940 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: 1.3.3
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *76018940
|
37
37
|
description: Easily scope user interactions with site using bbq widgets
|
38
38
|
email:
|
39
39
|
- robert.pankowecki@gmail.com
|
@@ -91,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
segments:
|
93
93
|
- 0
|
94
|
-
hash: -
|
94
|
+
hash: -943484735
|
95
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
96
|
none: false
|
97
97
|
requirements:
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
segments:
|
102
102
|
- 0
|
103
|
-
hash: -
|
103
|
+
hash: -943484735
|
104
104
|
requirements: []
|
105
105
|
rubyforge_project: bbq-widget
|
106
106
|
rubygems_version: 1.6.2
|