tddium-preview 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/lib/tddium.rb +1 -1
- data/lib/tddium/constant.rb +0 -1
- data/lib/tddium/version.rb +1 -1
- data/spec/tddium_spec.rb +6 -9
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/lib/tddium.rb
CHANGED
@@ -177,7 +177,7 @@ class Tddium < Thor
|
|
177
177
|
test_execution_params[:max_parallelism] = max_parallelism
|
178
178
|
end
|
179
179
|
|
180
|
-
test_pattern = get_remembered_option(options, :test_pattern,
|
180
|
+
test_pattern = get_remembered_option(options, :test_pattern, nil)
|
181
181
|
|
182
182
|
start_time = Time.now
|
183
183
|
|
data/lib/tddium/constant.rb
CHANGED
data/lib/tddium/version.rb
CHANGED
data/spec/tddium_spec.rb
CHANGED
@@ -32,7 +32,7 @@ describe Tddium do
|
|
32
32
|
SAMPLE_SESSION_ID = 1
|
33
33
|
SAMPLE_SUITE_ID = 1
|
34
34
|
SAMPLE_USER_ID = 1
|
35
|
-
DEFAULT_TEST_PATTERN =
|
35
|
+
DEFAULT_TEST_PATTERN = "**/*_spec.rb"
|
36
36
|
SAMPLE_SUITE_PATTERN = "features/*.feature, spec/**/*_spec.rb"
|
37
37
|
CUSTOM_TEST_PATTERN = "**/cat_spec.rb"
|
38
38
|
SAMPLE_SUITE_RESPONSE = {"repo_name" => SAMPLE_APP_NAME,
|
@@ -84,9 +84,6 @@ describe Tddium do
|
|
84
84
|
[:suite, :spec, :status, :account, :login, :logout, :password, :heroku].each do |method|
|
85
85
|
def prep_params(method, params=nil)
|
86
86
|
options = params.first || {}
|
87
|
-
if method == :spec
|
88
|
-
options[:test_pattern] = DEFAULT_TEST_PATTERN unless options.has_key?(:test_pattern)
|
89
|
-
end
|
90
87
|
options[:environment] = "test" unless options.has_key?(:environment)
|
91
88
|
options
|
92
89
|
end
|
@@ -920,13 +917,13 @@ describe Tddium do
|
|
920
917
|
it "should POST the test_pattern parameter" do
|
921
918
|
current_dir = Dir.pwd
|
922
919
|
call_api_should_receive(:params => {:suite_id => SAMPLE_SUITE_ID,
|
923
|
-
:test_pattern =>
|
920
|
+
:test_pattern => nil})
|
924
921
|
run_spec(tddium)
|
925
922
|
end
|
926
923
|
end
|
927
924
|
|
928
925
|
context "--test-pattern=#{CUSTOM_TEST_PATTERN}" do
|
929
|
-
it "should
|
926
|
+
it "should post the test_pattern extracted from the test_pattern parameter" do
|
930
927
|
current_dir = Dir.pwd
|
931
928
|
call_api_should_receive(:params => {:suite_id => SAMPLE_SUITE_ID,
|
932
929
|
:test_pattern => CUSTOM_TEST_PATTERN})
|
@@ -935,7 +932,7 @@ describe Tddium do
|
|
935
932
|
end
|
936
933
|
|
937
934
|
context "remembered from last run" do
|
938
|
-
it "should POST the
|
935
|
+
it "should POST the remembered test_pattern" do
|
939
936
|
tddium.stub(:current_suite_options).and_return({'test_pattern'=>CUSTOM_TEST_PATTERN})
|
940
937
|
current_dir = Dir.pwd
|
941
938
|
call_api_should_receive(:params => {:suite_id => SAMPLE_SUITE_ID,
|
@@ -1093,7 +1090,7 @@ describe Tddium do
|
|
1093
1090
|
end
|
1094
1091
|
|
1095
1092
|
it "should save the spec options" do
|
1096
|
-
tddium.should_receive(:write_suite).with(SAMPLE_SUITE_ID, {"user_data_file" => nil, "max_parallelism" => 3, "test_pattern" =>
|
1093
|
+
tddium.should_receive(:write_suite).with(SAMPLE_SUITE_ID, {"user_data_file" => nil, "max_parallelism" => 3, "test_pattern" => nil})
|
1097
1094
|
run_spec(tddium, {:max_parallelism => 3})
|
1098
1095
|
end
|
1099
1096
|
|
@@ -1154,7 +1151,7 @@ describe Tddium do
|
|
1154
1151
|
end
|
1155
1152
|
|
1156
1153
|
it "should save the spec options" do
|
1157
|
-
tddium.should_receive(:write_suite).with(SAMPLE_SUITE_ID, {"user_data_file" => nil, "max_parallelism" => 3, "test_pattern" =>
|
1154
|
+
tddium.should_receive(:write_suite).with(SAMPLE_SUITE_ID, {"user_data_file" => nil, "max_parallelism" => 3, "test_pattern" => nil})
|
1158
1155
|
run_spec(tddium, {:max_parallelism => 3})
|
1159
1156
|
end
|
1160
1157
|
|