lib/soaspec/exe_helpers.rb in soaspec-0.0.28 vs lib/soaspec/exe_helpers.rb in soaspec-0.0.29

- old
+ new

@@ -81,9 +81,49 @@ end EOF end + # @return [String] Content of README.md to aid someone getting started with this using this gem + def readme_content + <<-EOF + +# Prerequisites +This creates files within an existing folder. It could add onto an existing project. +For a new project create a folder and be at it's location on the command line + +``` +mkdir soaspec_test +cd soaspec_test +``` + +Run `bundle install` to install the gems mentioned in the Gemfile. + +To avoid conflict with gems on the machine globally it may be better to specify gem location with: + +`bundle install --path ~/.gem` + +# Running tests +On the command line type: +`bundle exec rake spec` or simply `bundle exec rake` + +# Structure + +## Tests +Tests are within the 'spec' folder and end in '_spec'. Setup and teardown for tests is in 'spec/spec_helper' + +## Templates +These are the base requests with ERB inside them to create smartly changing requests accoring to the test.yml + +## Libaries +Libaries to be installed are in 'Gemfile'. Specific gem versions can be specified here and enforeced with `bundle exec rake` + +## Reports +Reports are shown in the 'logs' folder. By default Rake produces a junit, an html report, and a traffic.log file with the API request and responses in it + + EOF + end + # Convert key in camelcase to underscore separated (snakecase) def underscore_key(key) key.to_s.gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2') .gsub(/([a-z\d])([A-Z])/,'\1_\2') .tr('-', '_') \ No newline at end of file