flowaker 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +66 -0
- data/Rakefile +1 -0
- data/flowaker.gemspec +23 -0
- data/lib/flowaker/rspec.rb +22 -0
- data/lib/flowaker/version.rb +3 -0
- data/lib/flowaker.rb +2 -0
- metadata +81 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a9ba75e558eb589781233a8b76a6b4433706d78a
|
4
|
+
data.tar.gz: 9471bab643421d19d3c4d1cfc6395c4c256033c9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 50f1c02eabd52f759086771cff0e5b29bb08ae6ad3151ce81eef7a182615e0d3c73631e274785473c4d224381c760269efef7728be4ab1c7a072206db5d54557
|
7
|
+
data.tar.gz: c4596a1e2bc9517aa34b6dbafd4a41f542e594cac5cebf08386031a558122949f646962181f2f46d206abf5075db92ccda4e7a380a7135f79832f5ac3450b143
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Jon Evans
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
# Flowaker
|
2
|
+
|
3
|
+
Are you bummed out by acceptance specs taking forever? Do you go through the whole sign in and creation process through the application everytime you want to just test, say, deleting a resource? Wouldn't it be nice if you could maintain well-organized, modular specs but not have to do all that? Now you can!
|
4
|
+
|
5
|
+
Flowaker is intended to provide organization and helpful output for specs with the understanding that each `step` block is part of the `flow`, meaning that it's dependent on preceding steps.
|
6
|
+
|
7
|
+
Only RSpec is currently supported. Feel free to add support of additional testing frameworks!
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
gem 'flowaker'
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install flowaker
|
22
|
+
|
23
|
+
Finally, in your spec helper, add:
|
24
|
+
|
25
|
+
require 'flowaker/rspec'
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
Here's an example:
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
feature 'Posts', js: true do
|
33
|
+
background do
|
34
|
+
sign_in(:admin)
|
35
|
+
end
|
36
|
+
|
37
|
+
flow 'Post CRUD flow', js: true do
|
38
|
+
step 'Viewing all' do
|
39
|
+
visit '/admin/posts'
|
40
|
+
expect(page).to have_content 'All Posts'
|
41
|
+
# etc ...
|
42
|
+
end
|
43
|
+
|
44
|
+
step 'Creating' do
|
45
|
+
click_on 'Add New Post'
|
46
|
+
# etc ...
|
47
|
+
end
|
48
|
+
|
49
|
+
step 'Editing' do
|
50
|
+
# etc ...
|
51
|
+
end
|
52
|
+
|
53
|
+
step 'Deleting' do
|
54
|
+
# etc ...
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
```
|
59
|
+
|
60
|
+
## Contributing
|
61
|
+
|
62
|
+
1. Fork it
|
63
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
64
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
65
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
66
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/flowaker.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'flowaker/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "flowaker"
|
8
|
+
spec.version = Flowaker::VERSION
|
9
|
+
spec.authors = ["Jon Evans"]
|
10
|
+
spec.email = ["jle@foraker.com"]
|
11
|
+
spec.description = %q{Flowaker-ize your specs}
|
12
|
+
spec.summary = %q{Organize your specs into flows}
|
13
|
+
spec.homepage = "https://github.com/foraker/flowaker"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Flowaker
|
2
|
+
module RSpec
|
3
|
+
def self.included(base)
|
4
|
+
base.instance_eval do
|
5
|
+
alias :flow :it
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
def step(description, &block)
|
10
|
+
yield
|
11
|
+
reporter.example_passed StepExample.new(description)
|
12
|
+
end
|
13
|
+
|
14
|
+
def reporter
|
15
|
+
::RSpec.configuration.reporter
|
16
|
+
end
|
17
|
+
|
18
|
+
class StepExample < Struct.new(:description); end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
::RSpec.configuration.include Flowaker::RSpec
|
data/lib/flowaker.rb
ADDED
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: flowaker
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jon Evans
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-11-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Flowaker-ize your specs
|
42
|
+
email:
|
43
|
+
- jle@foraker.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- .gitignore
|
49
|
+
- Gemfile
|
50
|
+
- LICENSE.txt
|
51
|
+
- README.md
|
52
|
+
- Rakefile
|
53
|
+
- flowaker.gemspec
|
54
|
+
- lib/flowaker.rb
|
55
|
+
- lib/flowaker/rspec.rb
|
56
|
+
- lib/flowaker/version.rb
|
57
|
+
homepage: https://github.com/foraker/flowaker
|
58
|
+
licenses:
|
59
|
+
- MIT
|
60
|
+
metadata: {}
|
61
|
+
post_install_message:
|
62
|
+
rdoc_options: []
|
63
|
+
require_paths:
|
64
|
+
- lib
|
65
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - '>='
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
requirements: []
|
76
|
+
rubyforge_project:
|
77
|
+
rubygems_version: 2.0.0
|
78
|
+
signing_key:
|
79
|
+
specification_version: 4
|
80
|
+
summary: Organize your specs into flows
|
81
|
+
test_files: []
|