bbq 0.0.2.beta.3 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +112 -27
- data/lib/bbq/version.rb +1 -1
- metadata +22 -19
data/README.md
CHANGED
@@ -28,6 +28,10 @@ Example applications
|
|
28
28
|
====================
|
29
29
|
|
30
30
|
* https://github.com/pawelpacana/roundtrip
|
31
|
+
|
32
|
+
Related examples
|
33
|
+
================
|
34
|
+
|
31
35
|
* https://github.com/pawelpacana/eventmachine-bbq-example
|
32
36
|
* https://github.com/drugpl/drug-site
|
33
37
|
|
@@ -38,7 +42,7 @@ First, add BBQ to your apps Gemfile:
|
|
38
42
|
|
39
43
|
```ruby
|
40
44
|
# Gemfile
|
41
|
-
gem "bbq", "~> 0.0.2
|
45
|
+
gem "bbq", "~> 0.0.2"
|
42
46
|
```
|
43
47
|
|
44
48
|
Run install generator:
|
@@ -47,12 +51,18 @@ Run install generator:
|
|
47
51
|
rails generate bbq:install
|
48
52
|
```
|
49
53
|
|
50
|
-
Require BBQ in test/test_helper.rb:
|
54
|
+
Require BBQ in test/test_helper.rb (in case of Test::Unit):
|
51
55
|
|
52
56
|
```ruby
|
53
57
|
require "bbq/test"
|
54
58
|
```
|
55
59
|
|
60
|
+
Require BBQ in spec/spec_helper.rb (in case of RSpec):
|
61
|
+
|
62
|
+
```ruby
|
63
|
+
require "bbq/rspec"
|
64
|
+
```
|
65
|
+
|
56
66
|
Feature generator
|
57
67
|
=================
|
58
68
|
|
@@ -60,33 +70,107 @@ Feature generator
|
|
60
70
|
rails g bbq:test MyFeatureName
|
61
71
|
```
|
62
72
|
|
73
|
+
Running features
|
74
|
+
================
|
75
|
+
|
76
|
+
For Test::Unit flavour:
|
77
|
+
|
78
|
+
```
|
79
|
+
rake test:acceptance
|
80
|
+
```
|
81
|
+
|
82
|
+
For RSpec flavour:
|
83
|
+
|
84
|
+
```
|
85
|
+
spec:acceptance
|
86
|
+
```
|
87
|
+
|
63
88
|
Examples
|
64
89
|
========
|
65
90
|
|
66
91
|
```ruby
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
92
|
+
module Roundtrip
|
93
|
+
class TestUser < Bbq::TestUser
|
94
|
+
include Bbq::Devise
|
95
|
+
|
96
|
+
def update_ticket(summary, comment)
|
97
|
+
show_ticket(summary)
|
98
|
+
fill_in "Comment", :with => comment
|
99
|
+
click_on "Add update"
|
100
|
+
end
|
101
|
+
|
102
|
+
module TicketReporter
|
103
|
+
def open_tickets_listing
|
104
|
+
visit tickets_path
|
105
|
+
end
|
106
|
+
|
107
|
+
def open_ticket(summary, description)
|
108
|
+
open_tickets_listing
|
109
|
+
click_on "Open a new ticket"
|
110
|
+
fill_in "Summary", :with => summary
|
111
|
+
fill_in "Description", :with => description
|
112
|
+
click_on "Open ticket"
|
113
|
+
end
|
114
|
+
|
115
|
+
def show_ticket(summary)
|
116
|
+
open_tickets_listing
|
117
|
+
click_on summary
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
module TicketManager
|
122
|
+
def open_tickets_listing
|
123
|
+
visit admin_tickets_path
|
124
|
+
end
|
125
|
+
|
126
|
+
def close_ticket(summary, comment = nil)
|
127
|
+
open_tickets_listing
|
128
|
+
click_on summary
|
129
|
+
fill_in "Comment", :with => comment if comment
|
130
|
+
click_on "Close ticket"
|
131
|
+
end
|
132
|
+
|
133
|
+
def show_ticket(summary)
|
134
|
+
open_tickets_listing
|
135
|
+
click_on summary
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
```
|
141
|
+
|
142
|
+
```ruby
|
143
|
+
class AdminTicketsTest < Bbq::TestCase
|
144
|
+
background do
|
145
|
+
admin = Factory(:admin)
|
146
|
+
@email, @password = admin.email, admin.password
|
147
|
+
end
|
148
|
+
|
149
|
+
scenario "admin can browse all user tickets" do
|
150
|
+
summaries = ["Forgot my password", "Page is not displayed correctly"]
|
151
|
+
descriptions = ["I lost my yellow note with password under the table!",
|
152
|
+
"My IE renders crap instead of crispy fonts!"]
|
153
|
+
|
154
|
+
alice = Roundtrip::TestUser.new
|
155
|
+
alice.roles(:ticket_reporter)
|
156
|
+
alice.register_and_login
|
157
|
+
alice.open_ticket(summaries.first, descriptions.first)
|
158
|
+
|
159
|
+
bob = Roundtrip::TestUser.new
|
160
|
+
bob.roles(:ticket_reporter)
|
161
|
+
bob.register_and_login
|
162
|
+
bob.open_ticket(summaries.second, descriptions.second)
|
163
|
+
|
164
|
+
charlie = Roundtrip::TestUser.new(:email => @email, :password => @password)
|
165
|
+
charlie.login # charlie was already "registered" in factory as admin
|
166
|
+
charlie.roles(:ticket_manager)
|
167
|
+
charlie.open_tickets_listing
|
168
|
+
charlie.see!(*summaries)
|
169
|
+
|
170
|
+
charlie.click_on(summaries.second)
|
171
|
+
charlie.see!(summaries.second, descriptions.second)
|
172
|
+
charlie.not_see!(summaries.first, descriptions.first)
|
173
|
+
end
|
90
174
|
end
|
91
175
|
```
|
92
176
|
|
@@ -117,7 +201,7 @@ Development environment
|
|
117
201
|
|
118
202
|
```
|
119
203
|
bundle install
|
120
|
-
bundle exec rake test
|
204
|
+
bundle exec rake test
|
121
205
|
```
|
122
206
|
|
123
207
|
Additional information
|
@@ -134,12 +218,13 @@ Maintainers
|
|
134
218
|
* Andrzej Krzywda (http://andrzejkrzywda.com)
|
135
219
|
* Michał Łomnicki (http://mlomnicki.com)
|
136
220
|
* Robert Pankowecki (http://robert.pankowecki.pl)
|
137
|
-
* Piotr Niełacny (http://ruby-blog.pl)
|
138
221
|
|
139
222
|
Contributors
|
140
223
|
============
|
141
224
|
|
225
|
+
* Piotr Niełacny (http://ruby-blog.pl)
|
142
226
|
* Peter Suschlik (http://peter.suschlik.de)
|
227
|
+
* Jan Dudek (http://jandudek.com)
|
143
228
|
|
144
229
|
Future plans
|
145
230
|
============
|
data/lib/bbq/version.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bbq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.2
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.2
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- DRUG - Dolnośląska Grupa Użytkowników Ruby
|
@@ -14,7 +14,7 @@ default_executable:
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: capybara
|
17
|
-
requirement: &
|
17
|
+
requirement: &14361700 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 1.0.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *14361700
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rails
|
28
|
-
requirement: &
|
28
|
+
requirement: &14361160 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 3.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *14361160
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: sqlite3
|
39
|
-
requirement: &
|
39
|
+
requirement: &14360560 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ~>
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: 1.3.3
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *14360560
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: rake
|
50
|
-
requirement: &
|
50
|
+
requirement: &14360060 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: 0.8.7
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *14360060
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: rdoc
|
61
|
-
requirement: &
|
61
|
+
requirement: &14359600 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ~>
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: '3.7'
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *14359600
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: devise
|
72
|
-
requirement: &
|
72
|
+
requirement: &14359020 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ~>
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: 1.4.0
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *14359020
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: rspec-rails
|
83
|
-
requirement: &
|
83
|
+
requirement: &14358560 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ~>
|
@@ -88,7 +88,7 @@ dependencies:
|
|
88
88
|
version: 2.6.0
|
89
89
|
type: :development
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *14358560
|
92
92
|
description: Objected oriented acceptance testing for Rails, using personas.
|
93
93
|
email:
|
94
94
|
- bbq@drug.org.pl
|
@@ -179,13 +179,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
179
179
|
version: '0'
|
180
180
|
segments:
|
181
181
|
- 0
|
182
|
-
hash:
|
182
|
+
hash: -2429979834433993951
|
183
183
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
184
|
none: false
|
185
185
|
requirements:
|
186
|
-
- - ! '
|
186
|
+
- - ! '>='
|
187
187
|
- !ruby/object:Gem::Version
|
188
|
-
version:
|
188
|
+
version: '0'
|
189
|
+
segments:
|
190
|
+
- 0
|
191
|
+
hash: -2429979834433993951
|
189
192
|
requirements: []
|
190
193
|
rubyforge_project: bbq
|
191
194
|
rubygems_version: 1.6.2
|