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

Fix current event through fire #638

Merged
merged 3 commits into from
Aug 1, 2019

Conversation

DoubleJarvis
Copy link

Should fix #551. It already has a PR that should fix it, but it has duplicate logic, and its just lying there for a year, unmerged, and the issue is still present.

describe "when calling events with fire/fire!" do
it "fire should populate aasm.current_event" do
pe.aasm.fire(:wakeup)
expect(pe.aasm.current_event).to eq :wakeup
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add assertion for transition as well?

@DoubleJarvis DoubleJarvis force-pushed the fix_current_event_through_fire branch from 2bb992b to cf75bdb Compare July 20, 2019 14:09
@codeclimate
Copy link

codeclimate bot commented Jul 20, 2019

Code Climate has analyzed commit cf75bdb and detected 0 issues on this pull request.

View more on Code Climate.

@DoubleJarvis
Copy link
Author

Are the tests in cf75bdb satisfactory, or you mean something else by transition? @anilmaurya

@anilmaurya
Copy link
Member

@DoubleJarvis Tests looks good 👍. Thank you for contributing.

Tests are failing on travis for some other reason. First I will fix travis build then I will merge your PR.

@anilmaurya anilmaurya merged commit b318433 into aasm:master Aug 1, 2019
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.

aasm.current_event incorrectly yields nil when calling aasm.fire!(:event)
2 participants