This repository has been archived by the owner on Apr 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
84 additions
and
4 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
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
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
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
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
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
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 @@ | ||
require 'spec_helper' | ||
|
||
describe Badge do | ||
it "does things" do | ||
expect(true).to be false | ||
end | ||
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,22 @@ | ||
begin | ||
require 'rspec/core/rake_task' | ||
|
||
spec_tasks = Dir['spec/*/'].each_with_object([]) do |d, result| | ||
result << File.basename(d) unless Dir["#{d}*"].empty? | ||
end | ||
|
||
spec_tasks.each do |folder| | ||
desc "Run the spec suite in #{folder}" | ||
RSpec::Core::RakeTask.new("spec:#{folder}") do |t| | ||
t.pattern = "./spec/#{folder}/**/*_spec.rb" | ||
t.rspec_opts = "--color" | ||
end | ||
end | ||
|
||
desc "Run complete application spec suite" | ||
task 'spec' => spec_tasks.map { |f| "spec:#{f}" } | ||
rescue LoadError | ||
task :spec do | ||
puts "RSpec is not part of this bundle, skip specs." | ||
end | ||
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,21 @@ | ||
RACK_ENV = 'test' unless defined?(RACK_ENV) | ||
require File.expand_path(File.dirname(__FILE__) + "/../config/boot") | ||
Dir[File.expand_path(File.dirname(__FILE__) + "/../app/helpers/**/*.rb")].each(&method(:require)) | ||
|
||
RSpec.configure do |conf| | ||
conf.include Rack::Test::Methods | ||
end | ||
|
||
# You can use this method to custom specify a Rack app | ||
# you want rack-test to invoke: | ||
# | ||
# app DemoProject::App | ||
# app DemoProject::App.tap { |a| } | ||
# app(DemoProject::App) do | ||
# set :foo, :bar | ||
# end | ||
# | ||
def app(app = nil, &blk) | ||
@app ||= block_given? ? app.instance_eval(&blk) : app | ||
@app ||= Padrino.application | ||
end |