Skip to content

Commit

Permalink
Merge pull request #6 from everypolitician-scrapers/setup-custom-test…
Browse files Browse the repository at this point in the history
…-framework--refactor

Set up framework for custom tests
  • Loading branch information
tmtmtmtm authored May 19, 2017
2 parents 7bedfec + 31a5d99 commit b0c495c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ require 'rake/testtask'

RuboCop::RakeTask.new

Rake::TestTask.new do |t|
t.test_files = FileList['test/**/*_test.rb']
end

require 'scraper_test'
ScraperTest::RakeTask.new.install_tasks

Expand Down
10 changes: 10 additions & 0 deletions test/dummy_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

require_relative './test_helper'

describe 'dummy test' do
it 'should run' do
# This test is included to ensure that
# test_helper is run by Travis
end
end
12 changes: 12 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

require 'minitest/around/spec'
require 'minitest/autorun'
require 'pry'
require 'vcr'
require 'webmock'

VCR.configure do |c|
c.cassette_library_dir = 'test/cassettes'
c.hook_into :webmock
end

0 comments on commit b0c495c

Please sign in to comment.