Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Initial commit; base project setup.
- Loading branch information
0 parents
commit d0bb8dd
Showing
17 changed files
with
449 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Ruby Generated | ||
|
||
/Gemfile.lock | ||
/.bundle/ | ||
/.yardoc | ||
/_yardoc/ | ||
/coverage/ | ||
/doc/ | ||
/pkg/ | ||
/spec/reports/ | ||
/spec/coverage/ | ||
/tmp/ | ||
|
||
# Generated Reports | ||
reports/ | ||
|
||
# Rspec Failure Tracking | ||
|
||
.rspec_status | ||
|
||
# IDE Files | ||
|
||
.idea/ | ||
*.iml | ||
*.iws | ||
*.ipr | ||
.vscode/ | ||
.settings/ | ||
.metadata | ||
.classpath | ||
.loadpath | ||
.buildpath | ||
.project | ||
|
||
# OS Files | ||
|
||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db | ||
$RECYCLE.BIN/ | ||
Desktop.ini | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
AllCops: | ||
Exclude: | ||
- testable.gemspec | ||
- spec/**/* | ||
|
||
# Removing need for frozen string literal comment. | ||
Style/FrozenStringLiteralComment: | ||
Enabled: false | ||
|
||
# Removing the preference for string single quotes. | ||
Style/StringLiterals: | ||
Enabled: false | ||
|
||
# Missing top-level module documentation comment. | ||
Style/Documentation: | ||
Enabled: false | ||
|
||
# Prefer reduce over inject. | ||
Style/CollectionMethods: | ||
PreferredMethods: | ||
reduce: 'inject' | ||
|
||
# Use each_with_object instead of inject. | ||
Style/EachWithObject: | ||
Enabled: false | ||
|
||
# Prefer fail over raise. | ||
Style/SignalException: | ||
Enabled: false | ||
|
||
# This never works for validations. | ||
Layout/AlignHash: | ||
EnforcedLastArgumentHashStyle: ignore_implicit | ||
|
||
# Align multi-line params with previous line. | ||
Layout/AlignParameters: | ||
EnforcedStyle: with_fixed_indentation | ||
|
||
# Indent `when` clause one step from `case`. | ||
Layout/CaseIndentation: | ||
IndentOneStep: true | ||
|
||
# Don't force bad var names for reduce/inject loops. | ||
Style/SingleLineBlockParams: | ||
Enabled: false | ||
|
||
# For method chains, keep the dot with the method name. | ||
Layout/DotPosition: | ||
EnforcedStyle: leading | ||
|
||
# Stop nesting so hard. | ||
Metrics/BlockNesting: | ||
Max: 2 | ||
|
||
# Encourage short methods. | ||
Metrics/MethodLength: | ||
Max: 15 | ||
|
||
# Encourage short (as possible) modules. | ||
Metrics/ModuleLength: | ||
Max: 100 | ||
|
||
# Encourage fewer parameters. | ||
Metrics/ParameterLists: | ||
Max: 4 | ||
|
||
# Remove execute permissions check. | ||
Lint/ScriptPermission: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--format documentation | ||
--color | ||
--require spec_helper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
inherit_mode: | ||
merge: | ||
- Exclude | ||
|
||
inherit_from: | ||
- .hound.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
sudo: false | ||
language: ruby | ||
cache: bundler | ||
rvm: | ||
- 2.3.4 | ||
before_install: gem install bundler -v 2.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, gender identity and expression, level of experience, | ||
nationality, personal appearance, race, religion, or sexual identity and | ||
orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at TODO: Write your email address. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at [http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "coveralls", require: false | ||
|
||
# Specify your gem's dependencies in testable.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
**The MIT License (MIT)** | ||
|
||
Copyright © 2019 Jeff Nyman | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Testable | ||
|
||
Testable is an automated test micro-framework that provides a thin wrapper around [Watir](http://watir.com/) and [Capybara](http://teamcapybara.github.io/capybara/). Testable is based on many ideas from tools like [SitePrism](https://github.com/natritmeyer/site_prism) and [Watirsome](https://github.com/p0deje/watirsome), while also being a logical evolution of my own tool, [Tapestry](https://github.com/jeffnyman/tapestry). | ||
|
||
An automated test framework provides a machine-executable abstraction around testing and encodes a set of guiding principles and heuristics for writing tests-as-code. | ||
|
||
One of the obstacles to covering the gap between principles of testing and the practice of testing is the mechanics of writing tests. These mechanics are focused on abstractions. A lot of the practice of testing comes down to that: finding the right abstractions. Any automated test framework should be capable of consuming your preferred abstractions because ultimately your automation is simply a tool that supports testing, which means how the framework encourages tests to be expressed should have high fidelty with how human tests would be expressed. | ||
|
||
Testable is built, as are all of my test-supporting tools, on the idea that automation should largely be small-footprint, low-fiction, and high-yield. | ||
|
||
The code that a test-supporting micro-framework allows should be modular, promoting both high cohesion and low coupling, as well as promoting a single level of abstraction. These concepts together lead to lightweight design as well as support traits that make change affordable. That makes the automation code less expensive to maintain and easier to change. That, ultimately, has a positive impact on the cost of change but, more importantly, allows Testable to be fit within a cost of mistake model, where the goal is to get feedback as quickly as possible regarding when mistakes are made. | ||
|
||
## Installation | ||
|
||
To get the latest stable release, add this line to your application's Gemfile: | ||
|
||
```ruby | ||
gem 'testable' | ||
``` | ||
|
||
To get the latest code: | ||
|
||
```ruby | ||
gem 'testable', git: 'https://github.com/jeffnyman/testable' | ||
``` | ||
|
||
After doing one of the above, execute the following command: | ||
|
||
$ bundle | ||
|
||
You can also install Testable just as you would any other gem: | ||
|
||
$ gem install testable | ||
|
||
## Usage | ||
|
||
Instructions coming soon. | ||
|
||
## Development | ||
|
||
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake spec:all` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. | ||
|
||
The default `rake` command will run all tests as well as a RuboCop analysis. | ||
|
||
To install this gem onto your local machine, run `bundle exec rake install`. | ||
|
||
## Contributing | ||
|
||
Bug reports and pull requests are welcome on GitHub at [https://github.com/jeffnyman/testable](https://github.com/jeffnyman/testable). The testing ecosystem of Ruby is very large and this project is intended to be a welcoming arena for collaboration on yet another test-supporting tool. | ||
|
||
Everyone interacting in the Testable project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/jeffnyman/testable/blob/master/CODE_OF_CONDUCT.md). | ||
|
||
The Testable gem follows [semantic versioning](http://semver.org). | ||
|
||
To contribute to Testable: | ||
|
||
1. [Fork the project](http://gun.io/blog/how-to-github-fork-branch-and-pull-request/). | ||
2. Create your feature branch. (`git checkout -b my-new-feature`) | ||
3. Commit your changes. (`git commit -am 'new feature'`) | ||
4. Push the branch. (`git push origin my-new-feature`) | ||
5. Create a new [pull request](https://help.github.com/articles/using-pull-requests). | ||
|
||
## Author | ||
|
||
* [Jeff Nyman](http://testerstories.com) | ||
|
||
## License | ||
|
||
Testable is distributed under the [MIT](http://www.opensource.org/licenses/MIT) license. | ||
See the [LICENSE](https://github.com/jeffnyman/testable/blob/master/LICENSE.md) file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env rake | ||
require "bundler/gem_tasks" | ||
|
||
require "rdoc/task" | ||
require "rubocop/rake_task" | ||
require "rspec/core/rake_task" | ||
|
||
RuboCop::RakeTask.new | ||
|
||
RSpec::Core::RakeTask.new(:spec) | ||
|
||
namespace :spec do | ||
desc 'Clean all generated reports' | ||
task :clean do | ||
system('rm -rf spec/reports') | ||
system('rm -rf spec/coverage') | ||
end | ||
|
||
RSpec::Core::RakeTask.new(all: :clean) do |config| | ||
options = %w[--color] | ||
options += %w[--format documentation] | ||
options += %w[--format html --out spec/reports/unit-test-report.html] | ||
|
||
config.rspec_opts = options | ||
end | ||
end | ||
|
||
Rake::RDocTask.new do |rdoc| | ||
rdoc.rdoc_dir = 'doc' | ||
rdoc.main = 'README.md' | ||
rdoc.title = "Testable #{Testable::VERSION}" | ||
rdoc.rdoc_files.include('README*', 'lib/**/*.rb') | ||
end | ||
|
||
task default: ['spec:all', :rubocop] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require "bundler/setup" | ||
require "testable" | ||
|
||
# You can add fixtures and/or initialization code here to make experimenting | ||
# with your gem easier. You can also use a different console, if you like. | ||
|
||
require "pry" | ||
Pry.start | ||
|
||
require "irb" | ||
IRB.start(__FILE__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
IFS=$'\n\t' | ||
set -vx | ||
|
||
bundle install | ||
|
||
# Do any other automated setup that you need to do here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
require "testable/version" | ||
|
||
module Testable | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module Testable | ||
VERSION = "0.1.0".freeze | ||
end |
Oops, something went wrong.