brooklynDev / airborne

RSpec driven API testing framework
MIT License
1.13k stars 122 forks source link

Rspec 3.5 compatibility #137

Closed axelson closed 7 years ago

axelson commented 7 years ago

Previously Airborne.base was loaded before the configuration was added. This caused an error:

Gem Load Error is: undefined method `requester_module' for

Waiting to load Airborne.base until the configuration has been added ( config.add_setting :requester_module) fixes the issue.

Fixes #121

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 99.102% when pulling 82b3421096b44d9f1227acfe3e743770759db1ff on myhobnob:rspec-3.5-compat into b6f902f6d80bd79924a85be7e53f93cd0fa326f3 on brooklynDev:master.

axelson commented 7 years ago

This fixes the tests in my project. But honestly I'm having trouble following the code. Specifically:

  base.send(:include, Airborne.configuration.requester_module)

From: https://github.com/brooklynDev/airborne/blob/b6f902f6d80bd79924a85be7e53f93cd0fa326f3/lib/airborne/base.rb#L20

It appears to be the only use of requester_module but it seems almost self-referential since it just refers to what I believe is the empty configuration added in lib/airborne.rb.

sethpollack commented 7 years ago

Thanks