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

Redesign to make Cob Spec easier to use. #13

Merged
merged 2 commits into from
Apr 19, 2013
Merged

Redesign to make Cob Spec easier to use. #13

merged 2 commits into from
Apr 19, 2013

Conversation

marosluuce
Copy link
Member

This is a major redesign to how cob spec works.

  • Updated fitnesse to the latest version.
  • Combined tests into a single suite.
  • Removed duplication in fixture code.
  • Updated tests to new fixture code.
  • Updated .rvmrc to 1.9.3
  • Removed Rubyslim submodule because it did not work with 1.9.3.
  • Updated README with new instructions.

There are probably some other minor changes that I've forgotten.

This is a major redesign to how cob spec works.
- Updated fitnesse to the latest version.
- Combined tests into a single suite.
- Removed duplication in fixture code.
- Updated tests to new fixture code.
- Updated .rvmrc to 1.9.3
- Removed Rubyslim submodule because it did not work with 1.9.3.
- Updated README with new instructions.

There are probably some other minor changes that I've forgotten.
@patrickgombert
Copy link
Contributor

I can't see the diff on like 2/3 of these files... I think Github just stopped trying to show diffs.

@patrickgombert
Copy link
Contributor

First, let me thank you for this! It's fantastic and it's almost ready to be pulled. I wasn't able to get this working out of the box, but I was able to get the Simple Get Request working against a Sinatra server after some work. Here are the changes I made to get it working.

  1. You need to add nokogiri to the Gemfile
  2. The HTTPTestSuite setup is a bit off:
    • rubyslim/lib isn't a valid path since it's relative to cob_spec's root. We need an absolute path here
    • The ruby runtime never requires the fixtures (http_server, server, simultaneous_http_browsers) even though they are on the load path. Therefore, when rubyslim tried to call the constructor for those objects it fails. We need to pass a -r flag to our COMMAND_PATTERN definition with the fixture files. This will require the files when the runtime starts and then ruby slim will be able to find the constructors.
    • You might want to remove the absolute paths to /Users/nkw/... and just leave this definitions blank. The README needs to have clear instructions on what these paths should be

There is another change which isn't essential, but would be nice to have. I would like remove the assumption that the server under test is being executed from a jar. We start a server with IO.popen("#{start_command} -p #{@PORT} -d #{@Directory}") and force people to use a -p and -d flag. Instead, we ought to just let the user define their start command and simply use IO.popen(start_command). Furthermore, can we change the variable HTTP_SERVER_JAR to HTTP_SEVER_START_COMMAND or something?

Updated the readme to be clearer. Updated gemfile to add missing
gems and updated gem versions. Modified server fixture to allow
different kinds of servers to be started. Fixed table formatting
in tests.
patrickgombert added a commit that referenced this pull request Apr 19, 2013
Redesign to make Cob Spec easier to use.
@patrickgombert patrickgombert merged commit a7f7700 into 8thlight:master Apr 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants