From 29dc152c2c715df5982d29ca1d1a2f2037d82178 Mon Sep 17 00:00:00 2001 From: Paolo Ambrosio Date: Sat, 21 Jun 2014 09:39:07 +0100 Subject: [PATCH 01/13] Update to use latest Cucumber-Ruby and RSpec matchers --- Gemfile | 2 +- features/step_definitions/cucumber_cpp_mappings.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 5cff3f9f..01e1b1e7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' group :test do - gem 'cucumber', "=1.3.6" + gem 'cucumber' gem 'aruba' gem 'rspec' end diff --git a/features/step_definitions/cucumber_cpp_mappings.rb b/features/step_definitions/cucumber_cpp_mappings.rb index 9dee4c36..9e1fbe93 100644 --- a/features/step_definitions/cucumber_cpp_mappings.rb +++ b/features/step_definitions/cucumber_cpp_mappings.rb @@ -200,7 +200,7 @@ def assert_data_table_equals_json(json) log_file_contents = IO.read(DATA_TABLE_LOG_FILE) actual_array = JSON.parse(log_file_contents) expected_array = JSON.parse(json) - actual_array.should == expected_array + expect(actual_array).to be == expected_array end end @@ -302,7 +302,7 @@ def write_main_step_definitions_file def compile_step_definitions compiler_output = %x[ #{COMPILE_STEP_DEFINITIONS_CMD} ] - expect($?.success?).to be_true, "Compilation failed!\n#{compiler_output}" + expect($?.success?).to be == true, "Compilation failed!\n#{compiler_output}" end def create_wire_file From e2de9682edf0d9ef8aec5044e8fd8040cbbef167 Mon Sep 17 00:00:00 2001 From: Kamil Strzempowicz Date: Thu, 14 Jan 2016 18:58:48 +0100 Subject: [PATCH 02/13] random --- CMakeLists.txt | 2 +- Gemfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 32f02675..8cb7c875 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,7 +108,7 @@ include_directories(${CUKE_INCLUDE_DIR}) set(CUKE_LIBRARIES cucumber-cpp ${CUKE_EXTRA_LIBRARIES}) add_subdirectory(src) -add_subdirectory(tests) +#add_subdirectory(tests) if(CUKE_ENABLE_EXAMPLES) add_subdirectory(examples) diff --git a/Gemfile b/Gemfile index 8725d0d2..72d175c0 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' group :test do gem 'cucumber', "=1.3.20" - gem 'aruba', "=0.5.3" - gem 'rspec', "=2.14.1" + gem 'aruba', "=0.6.1" + gem 'rspec', "=3.0.0" end From 6d5087b8d8b473349c16b25eda84304a4ec7e66c Mon Sep 17 00:00:00 2001 From: Kamil Strzempowicz Date: Fri, 8 Jan 2016 10:49:47 +0100 Subject: [PATCH 03/13] fix some deprected functions --- features/step_definitions/cucumber_cpp_mappings.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/features/step_definitions/cucumber_cpp_mappings.rb b/features/step_definitions/cucumber_cpp_mappings.rb index 9e1fbe93..3a041f75 100644 --- a/features/step_definitions/cucumber_cpp_mappings.rb +++ b/features/step_definitions/cucumber_cpp_mappings.rb @@ -172,11 +172,11 @@ def assert_executed_scenarios *scenario_offsets end def assert_world_variable_held_value_at_time(value, time) - check_exact_file_content "#{WORLD_VARIABLE_LOG_FILE}.#{time}", value + check_file_content("#{WORLD_VARIABLE_LOG_FILE}.#{time}", value, true) end def assert_world_function_called - check_file_presence [WORLD_FUNCTION_LOG_FILE], true + expect(WORLD_FUNCTION_LOG_FILE).to be_existing_file end def assert_cycle_sequence *args @@ -192,7 +192,7 @@ def assert_cycle_sequence_excluding *args def assert_complete_cycle_sequence *args expected_string = "#{CYCLE_SEQUENCE_SEPARATOR}#{args.join(CYCLE_SEQUENCE_SEPARATOR)}" - check_exact_file_content(CYCLE_LOG_FILE, expected_string) + check_file_content(CYCLE_LOG_FILE, expected_string, true) end def assert_data_table_equals_json(json) From 8a9f675f47836130a4f1096266ec34be1ecd5fd0 Mon Sep 17 00:00:00 2001 From: Kamil Strzempowicz Date: Thu, 14 Jan 2016 20:40:10 +0100 Subject: [PATCH 04/13] fixed failing feature with aruba > 6.1 - not sure if OK --- Gemfile | 2 +- features/step_definitions/cucumber_cpp_mappings.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 055b9116..913e15ba 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' group :test do gem 'cucumber', "=1.3.20" - gem 'aruba', "=0.6.1" + gem 'aruba', "=0.7.4" gem 'rspec', "=3.4.0" end diff --git a/features/step_definitions/cucumber_cpp_mappings.rb b/features/step_definitions/cucumber_cpp_mappings.rb index 3a041f75..d6b1e1f4 100644 --- a/features/step_definitions/cucumber_cpp_mappings.rb +++ b/features/step_definitions/cucumber_cpp_mappings.rb @@ -176,12 +176,12 @@ def assert_world_variable_held_value_at_time(value, time) end def assert_world_function_called - expect(WORLD_FUNCTION_LOG_FILE).to be_existing_file + expect(File.file?(WORLD_FUNCTION_LOG_FILE)).to be true end def assert_cycle_sequence *args expected_string = args.join CYCLE_SEQUENCE_SEPARATOR - check_file_content(CYCLE_LOG_FILE, expected_string, true) + expect(File.read(CYCLE_LOG_FILE)). to match expected_string end def assert_cycle_sequence_excluding *args From 9adc18b864d6970cb86e7a22045bbd8dd2ab1460 Mon Sep 17 00:00:00 2001 From: Kamil Strzempowicz Date: Thu, 14 Jan 2016 20:40:44 +0100 Subject: [PATCH 05/13] reverted skipping of unit tests --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cb7c875..32f02675 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,7 +108,7 @@ include_directories(${CUKE_INCLUDE_DIR}) set(CUKE_LIBRARIES cucumber-cpp ${CUKE_EXTRA_LIBRARIES}) add_subdirectory(src) -#add_subdirectory(tests) +add_subdirectory(tests) if(CUKE_ENABLE_EXAMPLES) add_subdirectory(examples) From 89b276cde162da23fafb58e665708bfb62327d32 Mon Sep 17 00:00:00 2001 From: Kamil Strzempowicz Date: Thu, 14 Jan 2016 21:16:56 +0100 Subject: [PATCH 06/13] fix for aruba 8.0 - not sure if OK --- Gemfile | 2 +- features/step_definitions/cucumber_cpp_mappings.rb | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index 913e15ba..10f6280e 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' group :test do gem 'cucumber', "=1.3.20" - gem 'aruba', "=0.7.4" + gem 'aruba', "=0.8.0" gem 'rspec', "=3.4.0" end diff --git a/features/step_definitions/cucumber_cpp_mappings.rb b/features/step_definitions/cucumber_cpp_mappings.rb index d6b1e1f4..4da5d508 100644 --- a/features/step_definitions/cucumber_cpp_mappings.rb +++ b/features/step_definitions/cucumber_cpp_mappings.rb @@ -196,12 +196,10 @@ def assert_complete_cycle_sequence *args end def assert_data_table_equals_json(json) - prep_for_fs_check do - log_file_contents = IO.read(DATA_TABLE_LOG_FILE) - actual_array = JSON.parse(log_file_contents) - expected_array = JSON.parse(json) - expect(actual_array).to be == expected_array - end + log_file_contents = File.read(DATA_TABLE_LOG_FILE) + actual_array = JSON.parse(log_file_contents) + expected_array = JSON.parse(json) + expect(actual_array).to be == expected_array end def run_feature From 756f56ad2f96ab242a432aad478727432357a9e1 Mon Sep 17 00:00:00 2001 From: Kamil Strzempowicz Date: Thu, 14 Jan 2016 21:42:54 +0100 Subject: [PATCH 07/13] update to latest working cucumber --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 10f6280e..6a6a0374 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' group :test do - gem 'cucumber', "=1.3.20" + gem 'cucumber', "=2.0.0" gem 'aruba', "=0.8.0" gem 'rspec', "=3.4.0" end From 37afea31b35dd05c55b3b9dbc73f2f206e986230 Mon Sep 17 00:00:00 2001 From: Kamil Strzempowicz Date: Thu, 14 Jan 2016 22:10:19 +0100 Subject: [PATCH 08/13] fix deprected warnings --- features/step_definitions/cucumber_cpp_mappings.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/features/step_definitions/cucumber_cpp_mappings.rb b/features/step_definitions/cucumber_cpp_mappings.rb index 4da5d508..fe961c8b 100644 --- a/features/step_definitions/cucumber_cpp_mappings.rb +++ b/features/step_definitions/cucumber_cpp_mappings.rb @@ -172,7 +172,7 @@ def assert_executed_scenarios *scenario_offsets end def assert_world_variable_held_value_at_time(value, time) - check_file_content("#{WORLD_VARIABLE_LOG_FILE}.#{time}", value, true) + expect(File.read("#{WORLD_VARIABLE_LOG_FILE}.#{time}")).to match value end def assert_world_function_called @@ -181,18 +181,18 @@ def assert_world_function_called def assert_cycle_sequence *args expected_string = args.join CYCLE_SEQUENCE_SEPARATOR - expect(File.read(CYCLE_LOG_FILE)). to match expected_string + expect(File.read(CYCLE_LOG_FILE)).to match expected_string end def assert_cycle_sequence_excluding *args args.each do |unexpected_string| - check_file_content(CYCLE_LOG_FILE, unexpected_string, false) + expect(File.read(CYCLE_LOG_FILE)).not_to match unexpected_string end end def assert_complete_cycle_sequence *args expected_string = "#{CYCLE_SEQUENCE_SEPARATOR}#{args.join(CYCLE_SEQUENCE_SEPARATOR)}" - check_file_content(CYCLE_LOG_FILE, expected_string, true) + expect(File.read(CYCLE_LOG_FILE)).to match expected_string end def assert_data_table_equals_json(json) From 24ee3c9bb378f0a1fced330657a6284972ac5a19 Mon Sep 17 00:00:00 2001 From: Kamil Strzempowicz Date: Tue, 19 Jan 2016 20:50:39 +0100 Subject: [PATCH 09/13] own fork of cucumber-tck --- .gitmodules | 2 +- features/cucumber-tck | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 80a75427..699b39f3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "features/cucumber-tck"] path = features/cucumber-tck - url = git://github.com/cucumber/cucumber-tck.git + url = https://github.com/konserw/cucumber-tck.git diff --git a/features/cucumber-tck b/features/cucumber-tck index 7ea91477..e05c4ed6 160000 --- a/features/cucumber-tck +++ b/features/cucumber-tck @@ -1 +1 @@ -Subproject commit 7ea91477edd14180ded92f7699d09689227644cd +Subproject commit e05c4ed6700d0a42312fbe0011c1ed69a44980d9 From 9acca9081193721f335737e19856b37c7cfe3e94 Mon Sep 17 00:00:00 2001 From: Kamil Strzempowicz Date: Tue, 19 Jan 2016 21:09:00 +0100 Subject: [PATCH 10/13] This commits the fixed-up submodule entry. --- features/cucumber-tck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/cucumber-tck b/features/cucumber-tck index e05c4ed6..05b4fbce 160000 --- a/features/cucumber-tck +++ b/features/cucumber-tck @@ -1 +1 @@ -Subproject commit e05c4ed6700d0a42312fbe0011c1ed69a44980d9 +Subproject commit 05b4fbced93245f30393a21a21dd7b23472816f1 From 4173c0ed77d616b9ac6777380611a410d9f1ca83 Mon Sep 17 00:00:00 2001 From: Kamil Strzempowicz Date: Tue, 19 Jan 2016 22:30:41 +0100 Subject: [PATCH 11/13] [cucumber-tck]fixed #current_directory deprected warnings --- features/cucumber-tck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/cucumber-tck b/features/cucumber-tck index 05b4fbce..217931ba 160000 --- a/features/cucumber-tck +++ b/features/cucumber-tck @@ -1 +1 @@ -Subproject commit 05b4fbced93245f30393a21a21dd7b23472816f1 +Subproject commit 217931ba817374672d9b8ee303a9a08091dfb178 From 0f0756fad6b7b3c9336f8204e906f1686499ca6a Mon Sep 17 00:00:00 2001 From: Kamil Strzempowicz Date: Mon, 29 Feb 2016 16:59:04 +0100 Subject: [PATCH 12/13] shut up postinstall messages --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 6a6a0374..7bdfc5fa 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,7 @@ source 'https://rubygems.org' group :test do + gem 'gem-shut-the-fuck-up' gem 'cucumber', "=2.0.0" gem 'aruba', "=0.8.0" gem 'rspec', "=3.4.0" From 987f0d4abdc41898f15cc4ec78ac393e091979d6 Mon Sep 17 00:00:00 2001 From: Kamil Strzempowicz Date: Tue, 1 Mar 2016 20:41:26 +0100 Subject: [PATCH 13/13] move shut up gem to build scripts --- Gemfile | 1 - travis.sh | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 7bdfc5fa..6a6a0374 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,6 @@ source 'https://rubygems.org' group :test do - gem 'gem-shut-the-fuck-up' gem 'cucumber', "=2.0.0" gem 'aruba', "=0.8.0" gem 'rspec', "=3.4.0" diff --git a/travis.sh b/travis.sh index 0208a6b8..b7663aec 100755 --- a/travis.sh +++ b/travis.sh @@ -1,5 +1,6 @@ #!/bin/sh set -e #break script on non-zero exitcode from any command +gem install gem-shut-the-fuck-up gem install bundler cmake -E make_directory build cmake -E chdir build cmake -DCUKE_ENABLE_EXAMPLES=on -DGTEST_INCLUDE_DIR=/usr/src/gmock/gtest/include/ ..