on-internet
← Community

RSpec Mock - class does not implement the instance method: jql. Perhaps you meant to use `class_double` instead?

Stack Overflow ·

I want to mock method which use Jira-Ruby gem with jql lib def call client = JIRA::Client.new(options) client.Issue.jql( "project = #{project_key} AND status != Done AND status != Closed AND status != Cancelled AND status != Followup", query_options ) end my mock: let(:jql_options) do [ "project = TSW-123 AND status != Done AND status != Closed AND status != Cancelled AND status != Followup", query_options ] end let(:query_options) do { start_at: 0, max_results: 1000 } end let(:jira_client) { instance_double(JIRA::Client) } let(:issue) { instance_double(JIRA::Resource::Issue) } let(:issue_fact

Comments

Sign in or sign up to comment and upvote.

No comments yet.