Skip to content

Commit

Permalink
Merge pull request #28 from MinasMazar/mm/extract-dev-tools
Browse files Browse the repository at this point in the history
Remove support for testing and extensions
  • Loading branch information
aldesantis authored Dec 13, 2019
2 parents 9df07a6 + 1ee39a7 commit a2ae886
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 228 deletions.
56 changes: 0 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,62 +56,6 @@ end
config.to_prepare(&method(:activate).to_proc)
```

### Testing Helpers

This gem provides some useful helpers for RSpec to setup an extension's test
environment easily.

Into your extension's spec/spec_helper.rb:

```ruby
require "solidus_support/extension/feature_helper"
```

This helper loads configuration needed to run extensions feature specs
correctly, setting up Capybara and configuring Rails test application
to precompile assets before the first feature spec.

This helper requires the `rails_helper`, also provided by this gem and
requireable as a stand-alone helper.

By doing:

```ruby
require "solidus_support/extension/rails_helper"
```

extension's test suite will have all Rails related tests configuration,
like authorization helpers, Solidus core factories, url helpers, and
other helpers to easily work with Solidus Config.

This `rails_helper` in turn requires the basic `spec_helper`, which is
responsible to load a basic RSpec configuration, which could be needed
in all extensions. It is also requireable as a stand-alone helper with:

```ruby
require "solidus_support/extension/spec_helper"
```

### Coverage Collection

The gem also includes a SimpleCov configuration that will send your test
coverage information directly to Codecov.io. Simply add this at the top
of your `spec/spec_helper.rb`:

```ruby
require "solidus_support/extension/coverage"
```

**Note: Make sure to add this at the VERY TOP of your spec_helper,
otherwise you'll get skewed coverage reports!**

If your extension is in a public repo and being tested on Travis or
CircleCI, there's nothing else you need to do - you'll get coverage
reports for free!

If your setup is more complex, look at the [SimpleCov](https://github.com/colszowka/simplecov)
and [codecov-ruby](https://github.com/codecov/codecov-ruby) docs.

## Development

After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
Expand Down
16 changes: 0 additions & 16 deletions lib/solidus_support/extension/coverage.rb

This file was deleted.

44 changes: 0 additions & 44 deletions lib/solidus_support/extension/feature_helper.rb

This file was deleted.

45 changes: 0 additions & 45 deletions lib/solidus_support/extension/rails_helper.rb

This file was deleted.

19 changes: 0 additions & 19 deletions lib/solidus_support/extension/spec_helper.rb

This file was deleted.

45 changes: 0 additions & 45 deletions lib/solidus_support/testing_support/preferences.rb

This file was deleted.

3 changes: 0 additions & 3 deletions solidus_support.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,4 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rubocop'
spec.add_development_dependency 'rubocop-rspec'
spec.add_development_dependency 'solidus_core'

spec.add_dependency 'capybara-screenshot'
spec.add_dependency 'codecov'
end

0 comments on commit a2ae886

Please sign in to comment.