Created
August 6, 2019 09:47
-
-
Save SihemBouhenniche/0c93f49f0c317b7bb0e438c8ac83fa47 to your computer and use it in GitHub Desktop.
Behavior driven design (BDD) example on web applications with cucumber and ruby
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
require 'rubygems' | |
require 'cucumber' | |
require 'cucumber/rake/task' | |
#@!method init_host_name | |
#init host name, in dummy feature the host is google. | |
def init_host_name | |
if ENV['host'].equal? nil | |
ENV['host'] = 'https://www.google.com' | |
end | |
end | |
desc 'Run google search' | |
task :google_search_test do | |
init_host_name | |
ruby "-S bundle exec cucumber features/tests/dummy.feature" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment