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

[rfc] some notes on development #17

Open
wkoszek opened this issue Nov 10, 2015 · 2 comments
Open

[rfc] some notes on development #17

wkoszek opened this issue Nov 10, 2015 · 2 comments

Comments

@wkoszek
Copy link
Contributor

wkoszek commented Nov 10, 2015

I wanted to add some unit tests, and my understanding is that "rake" should do most of the necessary setup and configuration for me, but when I typed rake it gets stuck at the issue from below.

I'd like to understand if it all should just work, or whether I need to modify something.

wk:/w/repos/middleman-spellcheck> bundle
Fetching git://github.com/middleman/middleman.git
fatal: unable to connect to github.com:
github.com[0: 192.30.252.131]: errno=Operation timed out

Retrying git clone 'git://github.com/middleman/middleman.git' "/Users/wk/.bundler/cache/git/middleman-aed1a0fbc4b2942d67aa6c89e2b8ec89bfc74f07" --bare --no-hardlinks --quiet due to error (2/4): Bundler::Source::Git::GitCommandError Git error: command `git clone 'git://github.com/middleman/middleman.git' "/Users/wk/.bundler/cache/git/middleman-aed1a0fbc4b2942d67aa6c89e2b8ec89bfc74f07" --bare --no-hardlinks --quiet` in directory /w/repos/middleman-spellcheck has failed.
fatal: unable to connect to github.com:
github.com[0: 192.30.252.131]: errno=Operation timed out

Retrying git clone 'git://github.com/middleman/middleman.git' "/Users/wk/.bundler/cache/git/middleman-aed1a0fbc4b2942d67aa6c89e2b8ec89bfc74f07" --bare --no-hardlinks --quiet due to error (3/4): Bundler::Source::Git::GitCommandError Git error: command `git clone 'git://github.com/middleman/middleman.git' "/Users/wk/.bundler/cache/git/middleman-aed1a0fbc4b2942d67aa6c89e2b8ec89bfc74f07" --bare --no-hardlinks --quiet` in directory /w/repos/middleman-spellcheck has failed.

fatal: unable to connect to github.com:
github.com[0: 192.30.252.128]: errno=Operation timed out

Retrying git clone 'git://github.com/middleman/middleman.git' "/Users/wk/.bundler/cache/git/middleman-aed1a0fbc4b2942d67aa6c89e2b8ec89bfc74f07" --bare --no-hardlinks --quiet due to error (4/4): Bundler::Source::Git::GitCommandError Git error: command `git clone 'git://github.com/middleman/middleman.git' "/Users/wk/.bundler/cache/git/middleman-aed1a0fbc4b2942d67aa6c89e2b8ec89bfc74f07" --bare --no-hardlinks --quiet` in directory /w/repos/middleman-spellcheck has failed.
^Cwk:/w/repos/middleman-spellcheck>
@wkoszek
Copy link
Contributor Author

wkoszek commented Nov 11, 2015

I got stuff installed today, but I'm getting:

wk:/w/repos/middleman-spellcheck> rake
/usr/local/Cellar/ruby/2.2.3/bin/ruby -S bundle exec cucumber --color --tags ~@wip --strict --format pretty
Feature: Building an application with the spell checker allowed for some words

  Scenario: The spelling errors in the allowed words is ignored # features/allowed.feature:3
    Given a fixture app "allow_app"                             # /Users/wk/.bundler/ruby/2.2.0/middleman-77dad2a40009/middleman-core/lib/middleman-core/step_definitions/builder_steps.rb:20
      undefined local variable or method `current_directory' for #<Object:0x007ff2c19c68a8> (NameError)
      /Users/wk/.bundler/ruby/2.2.0/middleman-77dad2a40009/middleman-core/lib/middleman-core/step_definitions/builder_steps.rb:25:in `/^a fixture app "([^\"]*)"$/'
      features/allowed.feature:4:in `Given a fixture app "allow_app"'
    When I run `middleman build`                                # aruba-0.5.4/lib/aruba/cucumber.rb:84
    Then the exit status should be 0                            # aruba-0.5.4/lib/aruba/cucumber.rb:188

Feature: Building an application with the spell checker enabled for some tags

  Scenario: The spelling errors in other tags are ignored # features/only_tags.feature:3
    Given a fixture app "only_tags_app"                   # /Users/wk/.bundler/ruby/2.2.0/middleman-77dad2a40009/middleman-core/lib/middleman-core/step_definitions/builder_steps.rb:20
      undefined local variable or method `current_directory' for #<Object:0x007ff2c2560088> (NameError)
      /Users/wk/.bundler/ruby/2.2.0/middleman-77dad2a40009/middleman-core/lib/middleman-core/step_definitions/builder_steps.rb:25:in `/^a fixture app "([^\"]*)"$/'
      features/only_tags.feature:4:in `Given a fixture app "only_tags_app"'
    When I run `middleman build`                          # aruba-0.5.4/lib/aruba/cucumber.rb:84
    Then the exit status should be 0                      # aruba-0.5.4/lib/aruba/cucumber.rb:188

Feature: Building an application with the spell checker enabled for some paths

  Scenario: The spelling errors in the parameters that do not match the path are ignored # features/page_params.feature:3
    Given a fixture app "spelling_path_app"                                              # /Users/wk/.bundler/ruby/2.2.0/middleman-77dad2a40009/middleman-core/lib/middleman-core/step_definitions/builder_steps.rb:20
      undefined local variable or method `current_directory' for #<Object:0x007ff2c3e0a138> (NameError)
      /Users/wk/.bundler/ruby/2.2.0/middleman-77dad2a40009/middleman-core/lib/middleman-core/step_definitions/builder_steps.rb:25:in `/^a fixture app "([^\"]*)"$/'
      features/page_params.feature:4:in `Given a fixture app "spelling_path_app"'
    When I run `middleman build`                                                         # aruba-0.5.4/lib/aruba/cucumber.rb:84
    Then the exit status should be 0                                                     # aruba-0.5.4/lib/aruba/cucumber.rb:188

Feature: Launching a plain application

  Scenario: Shows a simple page                # features/plain_app.feature:3
    Given the Server is running at "plain_app" # /Users/wk/.bundler/ruby/2.2.0/middleman-77dad2a40009/middleman-core/lib/middleman-core/step_definitions/server_steps.rb:61
      undefined local variable or method `current_directory' for #<Object:0x007ff2c3e2bab8> (NameError)
      /Users/wk/.bundler/ruby/2.2.0/middleman-77dad2a40009/middleman-core/lib/middleman-core/step_definitions/builder_steps.rb:25:in `/^a fixture app "([^\"]*)"$/'
      /Users/wk/.bundler/ruby/2.2.0/middleman-77dad2a40009/middleman-core/lib/middleman-core/step_definitions/server_steps.rb:62:in `/^the Server is running at "([^\"]*)"$/'
      features/plain_app.feature:4:in `Given the Server is running at "plain_app"'
    When I go to "/"                           # /Users/wk/.bundler/ruby/2.2.0/middleman-77dad2a40009/middleman-core/lib/middleman-core/step_definitions/server_steps.rb:70
    Then I should see 'Hello, test'            # /Users/wk/.bundler/ruby/2.2.0/middleman-77dad2a40009/middleman-core/lib/middleman-core/step_definitions/server_steps.rb:94

Feature: Building an application with the spell checker enabled

  Scenario: When the spelling is correct       # features/spelling_check.feature:3
    Given a fixture app "correct_spelling_app" # /Users/wk/.bundler/ruby/2.2.0/middleman-77dad2a40009/middleman-core/lib/middleman-core/step_definitions/builder_steps.rb:20
      undefined local variable or method `current_directory' for #<Object:0x007ff2c4005ed8> (NameError)
      /Users/wk/.bundler/ruby/2.2.0/middleman-77dad2a40009/middleman-core/lib/middleman-core/step_definitions/builder_steps.rb:25:in `/^a fixture app "([^\"]*)"$/'
      features/spelling_check.feature:4:in `Given a fixture app "correct_spelling_app"'
    When I run `middleman build`               # aruba-0.5.4/lib/aruba/cucumber.rb:84
    Then the exit status should be 0           # aruba-0.5.4/lib/aruba/cucumber.rb:188

  Scenario: When the spelling is incorrect       # features/spelling_check.feature:8
    Given a fixture app "incorrect_spelling_app" # /Users/wk/.bundler/ruby/2.2.0/middleman-77dad2a40009/middleman-core/lib/middleman-core/step_definitions/builder_steps.rb:20
      undefined local variable or method `current_directory' for #<Object:0x007ff2c3e3a040> (NameError)
      /Users/wk/.bundler/ruby/2.2.0/middleman-77dad2a40009/middleman-core/lib/middleman-core/step_definitions/builder_steps.rb:25:in `/^a fixture app "([^\"]*)"$/'
      features/spelling_check.feature:9:in `Given a fixture app "incorrect_spelling_app"'
    When I run `middleman build`                 # aruba-0.5.4/lib/aruba/cucumber.rb:84
    Then the exit status should be 1             # aruba-0.5.4/lib/aruba/cucumber.rb:188

Failing Scenarios:
cucumber features/allowed.feature:3 # Scenario: The spelling errors in the allowed words is ignored
cucumber features/only_tags.feature:3 # Scenario: The spelling errors in other tags are ignored
cucumber features/page_params.feature:3 # Scenario: The spelling errors in the parameters that do not match the path are ignored
cucumber features/plain_app.feature:3 # Scenario: Shows a simple page
cucumber features/spelling_check.feature:3 # Scenario: When the spelling is correct
cucumber features/spelling_check.feature:8 # Scenario: When the spelling is incorrect

6 scenarios (6 failed)
18 steps (6 failed, 12 skipped)
0m0.017s

@wkoszek
Copy link
Contributor Author

wkoszek commented Nov 11, 2015

When I comment this one out from Gemfile:

#gem "middleman", :github => "middleman/middleman" , :branch => "v3-stable"

Then it's running fine, except from 1 test:

wk:/w/repos/middleman-spellcheck> rake
/usr/local/Cellar/ruby/2.2.3/bin/ruby -S bundle exec cucumber --color --tags ~@wip --strict --format pretty
Feature: Building an application with the spell checker allowed for some words

  Scenario: The spelling errors in the allowed words is ignored # features/allowed.feature:3
    Given a fixture app "allow_app"                             # middleman-core-3.3.12/lib/middleman-core/step_definitions/builder_steps.rb:20
    When I run `middleman build`                                # aruba-0.5.4/lib/aruba/cucumber.rb:84
    Then the exit status should be 0                            # aruba-0.5.4/lib/aruba/cucumber.rb:188

Feature: Building an application with the spell checker enabled for some tags

  Scenario: The spelling errors in other tags are ignored # features/only_tags.feature:3
    Given a fixture app "only_tags_app"                   # middleman-core-3.3.12/lib/middleman-core/step_definitions/builder_steps.rb:20
    When I run `middleman build`                          # aruba-0.5.4/lib/aruba/cucumber.rb:84
    Then the exit status should be 0                      # aruba-0.5.4/lib/aruba/cucumber.rb:188

Feature: Building an application with the spell checker enabled for some paths

  Scenario: The spelling errors in the parameters that do not match the path are ignored # features/page_params.feature:3
    Given a fixture app "spelling_path_app"                                              # middleman-core-3.3.12/lib/middleman-core/step_definitions/builder_steps.rb:20
    When I run `middleman build`                                                         # aruba-0.5.4/lib/aruba/cucumber.rb:84
    Then the exit status should be 0                                                     # aruba-0.5.4/lib/aruba/cucumber.rb:188

Feature: Launching a plain application

  Scenario: Shows a simple page                # features/plain_app.feature:3
    Given the Server is running at "plain_app" # middleman-core-3.3.12/lib/middleman-core/step_definitions/server_steps.rb:64
    When I go to "/"                           # middleman-core-3.3.12/lib/middleman-core/step_definitions/server_steps.rb:73
    Then I should see 'Hello, test'            # middleman-core-3.3.12/lib/middleman-core/step_definitions/server_steps.rb:97

Feature: Building an application with the spell checker enabled

  Scenario: When the spelling is correct       # features/spelling_check.feature:3
    Given a fixture app "correct_spelling_app" # middleman-core-3.3.12/lib/middleman-core/step_definitions/builder_steps.rb:20
    When I run `middleman build`               # aruba-0.5.4/lib/aruba/cucumber.rb:84
    Then the exit status should be 0           # aruba-0.5.4/lib/aruba/cucumber.rb:188

  Scenario: When the spelling is incorrect       # features/spelling_check.feature:8
    Given a fixture app "incorrect_spelling_app" # middleman-core-3.3.12/lib/middleman-core/step_definitions/builder_steps.rb:20
    When I run `middleman build`                 # aruba-0.5.4/lib/aruba/cucumber.rb:84
    Then the exit status should be 1             # aruba-0.5.4/lib/aruba/cucumber.rb:188
      Exit status was 0 but expected it to be 1. Output:

            create  build/index.html
        spellcheck  Running spell checker for /
          misspell  The word 'speling' is misspelled
          misspell  The word 'isuses' is misspelled
      == :dontfail set! Will issue warning only, but not fail.
      Build failed. There are spelling errors.

       (RSpec::Expectations::ExpectationNotMetError)
      features/spelling_check.feature:11:in `Then the exit status should be 1'

Failing Scenarios:
cucumber features/spelling_check.feature:8 # Scenario: When the spelling is incorrect

6 scenarios (1 failed, 5 passed)
18 steps (1 failed, 17 passed)
0m5.768s

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

No branches or pull requests

1 participant