Skip to content

Commit

Permalink
Replace tests with specs
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdefreyne committed Dec 2, 2015
1 parent d7e109d commit 2e6e09f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source 'https://rubygems.org'

gemspec

gem 'minitest'
gem 'rake'
gem 'coveralls', require: false
gem 'rake'
gem 'rspec'
gem 'rubocop'
10 changes: 5 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# encoding: utf-8

require 'rake/testtask'
require 'rubocop/rake_task'
require 'rspec/core/rake_task'

Rake::TestTask.new do |t|
t.libs = %w( lib test )
t.test_files = FileList['test/**/test_*.rb', 'test/**/*_spec.rb']
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = '-r ./spec/spec_helper.rb --color'
t.verbose = false
end

RuboCop::RakeTask.new(:rubocop) do |task|
task.options = %w( --display-cop-names --format simple )
task.patterns = ['lib/**/*.rb', 'test/**/*.rb']
end

task :default => [:test, :rubocop]
task :default => [:spec, :rubocop]
7 changes: 7 additions & 0 deletions spec/filter_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
describe Nanoc::Asciidoctor::Filter do
let(:filter) { described_class.new }

subject { filter.setup_and_run('== Blah blah') }

it { is_expected.to match(%r{<h2 id="_blah_blah">Blah blah</h2>}) }
end
2 changes: 0 additions & 2 deletions test/helper.rb → spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
require 'coveralls'
Coveralls.wear!

require 'minitest'
require 'minitest/autorun'
require 'nanoc'
require 'nanoc-asciidoctor'
13 changes: 0 additions & 13 deletions test/filters/test_asciidoctor.rb

This file was deleted.

0 comments on commit 2e6e09f

Please sign in to comment.