Add rspec
This commit is contained in:
parent
b8c01ca1d1
commit
60adffbbab
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@
|
||||
/pkg/
|
||||
/spec/reports/
|
||||
/tmp/
|
||||
/.rspec_status
|
||||
|
15
Gemfile.lock
15
Gemfile.lock
@ -6,7 +6,21 @@ PATH
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
diff-lcs (1.4.4)
|
||||
rake (12.3.2)
|
||||
rspec (3.10.0)
|
||||
rspec-core (~> 3.10.0)
|
||||
rspec-expectations (~> 3.10.0)
|
||||
rspec-mocks (~> 3.10.0)
|
||||
rspec-core (3.10.1)
|
||||
rspec-support (~> 3.10.0)
|
||||
rspec-expectations (3.10.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.10.0)
|
||||
rspec-mocks (3.10.2)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.10.0)
|
||||
rspec-support (3.10.2)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
@ -14,6 +28,7 @@ PLATFORMS
|
||||
DEPENDENCIES
|
||||
imbecile!
|
||||
rake (~> 12.0)
|
||||
rspec (~> 3.0)
|
||||
|
||||
BUNDLED WITH
|
||||
2.1.4
|
||||
|
4
Rakefile
4
Rakefile
@ -1,2 +1,6 @@
|
||||
require "bundler/gem_tasks"
|
||||
require "rspec/core/rake_task"
|
||||
|
||||
RSpec::Core::RakeTask.new(:spec)
|
||||
|
||||
task :default => :spec
|
||||
|
@ -26,4 +26,6 @@ Gem::Specification.new do |spec|
|
||||
spec.bindir = "exe"
|
||||
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
||||
spec.require_paths = ["lib"]
|
||||
|
||||
spec.add_development_dependency "rspec", "~> 3.0"
|
||||
end
|
||||
|
5
spec/imbecile_spec.rb
Normal file
5
spec/imbecile_spec.rb
Normal file
@ -0,0 +1,5 @@
|
||||
RSpec.describe Imbecile do
|
||||
it "has a version number" do
|
||||
expect(Imbecile::VERSION).not_to be nil
|
||||
end
|
||||
end
|
14
spec/spec_helper.rb
Normal file
14
spec/spec_helper.rb
Normal file
@ -0,0 +1,14 @@
|
||||
require "bundler/setup"
|
||||
require "imbecile"
|
||||
|
||||
RSpec.configure do |config|
|
||||
# Enable flags like --only-failures and --next-failure
|
||||
config.example_status_persistence_file_path = ".rspec_status"
|
||||
|
||||
# Disable RSpec exposing methods globally on `Module` and `main`
|
||||
config.disable_monkey_patching!
|
||||
|
||||
config.expect_with :rspec do |c|
|
||||
c.syntax = :expect
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user