File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 1- require "spec_helper"
1+ cwd = Dir . pwd
2+
3+ if cwd . include? "sample-code-ruby"
4+ puts "String includes sample-code-ruby"
5+ specpath = "./spec/"
6+ dirpath = "./"
7+ else
8+ specpath = "./sample-code-ruby/spec/"
9+ dirpath = "./sample-code-ruby/"
10+ end
11+
12+ require specpath + "spec_helper"
213
314include AuthorizeNet ::API
415
516describe "SampleCode Testing" do
617
718 before :all do
819 begin
9- Dir . glob ( "./ **/*.rb") do |item | # note one extra "*"
20+ Dir . glob ( dirpath + " **/*.rb") do |item | # note one extra "*"
1021 next if item == '.' or item == '..'
1122 item = item [ 0 ..-4 ]
1223
13- if item != './spec/ sample_code_spec'
24+ if item != specpath + ' sample_code_spec'
1425 puts "working on: #{ item } "
1526 require item
1627 end
You can’t perform that action at this time.
0 commit comments