This repository has been archived by the owner on Jul 21, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #930 from Fryguy/rspec
Add RSpec framework files
- Loading branch information
Showing
12 changed files
with
96 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ tmp/ | |
.rubocop-* | ||
.ruby-version | ||
/node_modules | ||
/spec/manageiq | ||
|
||
# IDEs and editors | ||
/.idea | ||
|
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,5 @@ | ||
--require manageiq/spec/spec_helper | ||
--require spec_helper | ||
--color | ||
--order random | ||
--exclude-pattern "spec/manageiq/**/*_spec.rb" |
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,6 @@ | ||
--require manageiq/spec/spec_helper | ||
--require spec_helper | ||
--color | ||
--order random | ||
--profile 25 | ||
--exclude-pattern "spec/manageiq/**/*_spec.rb" |
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 |
---|---|---|
@@ -1,15 +1,16 @@ | ||
require 'bundler/setup' | ||
|
||
begin | ||
require 'bundler/setup' | ||
require 'rspec/core/rake_task' | ||
|
||
APP_RAKEFILE = File.expand_path("../spec/manageiq/Rakefile", __FILE__) | ||
load 'rails/tasks/engine.rake' | ||
load 'rails/tasks/statistics.rake' | ||
rescue LoadError | ||
puts 'You must `gem install bundler` and `bundle install` to run rake tasks' | ||
end | ||
|
||
require 'rdoc/task' | ||
require 'bundler/gem_tasks' | ||
|
||
RDoc::Task.new(:rdoc) do |rdoc| | ||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = 'manageiq-v2v' | ||
rdoc.options << '--line-numbers' | ||
rdoc.rdoc_files.include('README.md') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end | ||
FileList['lib/tasks_private/**/*.rake'].each { |r| load r } | ||
|
||
task :default => :spec |
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,12 @@ | ||
#!/usr/bin/env ruby | ||
require 'pathname' | ||
|
||
gem_root = Pathname.new(__dir__).join("..") | ||
|
||
unless gem_root.join("spec/manageiq").exist? | ||
puts "== Cloning manageiq sample app ==" | ||
system "git clone https://github.com/ManageIQ/manageiq.git --branch master --depth 1 spec/manageiq" | ||
end | ||
|
||
require gem_root.join("spec/manageiq/lib/manageiq/environment").to_s | ||
ManageIQ::Environment.manageiq_plugin_setup |
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,14 @@ | ||
#!/usr/bin/env ruby | ||
require 'pathname' | ||
|
||
gem_root = Pathname.new(__dir__).join("..") | ||
|
||
if gem_root.join("spec/manageiq").symlink? | ||
puts "== SKIPPING update of spec/manageiq because its symlinked ==" | ||
else | ||
puts "== Updating manageiq sample app ==" | ||
system("git pull", :chdir => gem_root.join("spec/manageiq")) | ||
end | ||
|
||
require gem_root.join("spec/manageiq/lib/manageiq/environment").to_s | ||
ManageIQ::Environment.manageiq_plugin_update |
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,10 @@ | ||
namespace :spec do | ||
desc "Setup environment specs" | ||
task :setup => ["app:test:initialize", "app:test:verify_no_db_access_loading_rails_environment", "app:test:setup_db"] | ||
end | ||
|
||
desc "Run all specs" | ||
RSpec::Core::RakeTask.new(:spec => ["app:test:initialize", "app:evm:compile_sti_loader"]) do |t| | ||
spec_dir = File.expand_path("../../spec", __dir__) | ||
EvmTestHelper.init_rspec_task(t, ['--require', File.join(spec_dir, 'spec_helper')]) | ||
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
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,5 @@ | ||
describe MigrationLogController do | ||
it "stuff" do | ||
expect(1).to eq 1 | ||
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 @@ | ||
Dir[Rails.root.join("spec/shared/**/*.rb")].each { |f| require f } |