Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bindings/ruby): setup cucumber tests #1725

Merged
merged 5 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bindings/ruby/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ gem "rake", "~> 13.0"

gem "minitest", "~> 5.10"
gem "minitest-reporters", "~> 1.1"
gem "cucumber", "~> 8.0"
gem "color_pound_spec_reporter", "~> 0.0.6"

gem "standard", "~> 1.3"
8 changes: 7 additions & 1 deletion bindings/ruby/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ require "rake/testtask"
require "rake/extensiontask"
require "bundler/gem_tasks"
require "standard/rake"
require "cucumber"
require "cucumber/rake/task"

task default: ["lint", "test"]

Expand All @@ -38,5 +40,9 @@ end

Rake::TestTask.new do |t|
t.deps << :dev << :compile
t.test_files = FileList[File.expand_path("test/*_test.rb", __dir__)]
t.test_files = FileList[File.expand_path("tests/*_test.rb", __dir__)]
end

Cucumber::Rake::Task.new(:test) do |t|
t.cucumber_opts = ["--format pretty", "--publish-quiet"] # Any valid command line option can go here.
end
18 changes: 18 additions & 0 deletions bindings/ruby/cucumber.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

default: tests -r tests/steps
1 change: 1 addition & 0 deletions bindings/ruby/tests/binding.feature
64 changes: 64 additions & 0 deletions bindings/ruby/tests/steps/binding.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

Given("A new OpenDAL Blocking Operator") do
pending # Write code here that turns the phrase above into concrete actions
end

When("Blocking write path {string} with content {string}") do |string, string2|
pending # Write code here that turns the phrase above into concrete actions
end

Then("The blocking file {string} should exist") do |string|
pending # Write code here that turns the phrase above into concrete actions
end

Then("The blocking file {string} entry mode must be file") do |string|
pending # Write code here that turns the phrase above into concrete actions
end

Then("The blocking file {string} content length must be {string}") do |string, string2|
pending # Write code here that turns the phrase above into concrete actions
end

Then("The blocking file {string} must have content {string}") do |string, string2|
pending # Write code here that turns the phrase above into concrete actions
end

Given("A new OpenDAL Async Operator") do
pending # Write code here that turns the phrase above into concrete actions
end

When("Async write path {string} with content {string}") do |string, string2|
pending # Write code here that turns the phrase above into concrete actions
end

Then("The async file {string} should exist") do |string|
pending # Write code here that turns the phrase above into concrete actions
end

Then("The async file {string} entry mode must be file") do |string|
pending # Write code here that turns the phrase above into concrete actions
end

Then("The async file {string} content length must be {string}") do |string, string2|
pending # Write code here that turns the phrase above into concrete actions
end

Then("The async file {string} must have content {string}") do |string, string2|
pending # Write code here that turns the phrase above into concrete actions
end