{"action":"closed","issue":{"url":"https://api.github.com/repos/ddnexus/flex/issues/31","labels_url":"https://api.github.com/repos/ddnexus/flex/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/ddnexus/flex/issues/31/comments","events_url":"https://api.github.com/repos/ddnexus/flex/issues/31/events","html_url":"https://github.com/ddnexus/flex/issues/31","id":59747015,"number":31,"title":"How can flex support elasticsearch functions in test environment?","user":{"login":"ChunAllen","id":2100728,"avatar_url":"https://avatars.githubusercontent.com/u/2100728?v=3","gravatar_id":"","url":"https://api.github.com/users/ChunAllen","html_url":"https://github.com/ChunAllen","followers_url":"https://api.github.com/users/ChunAllen/followers","following_url":"https://api.github.com/users/ChunAllen/following{/other_user}","gists_url":"https://api.github.com/users/ChunAllen/gists{/gist_id}","starred_url":"https://api.github.com/users/ChunAllen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChunAllen/subscriptions","organizations_url":"https://api.github.com/users/ChunAllen/orgs","repos_url":"https://api.github.com/users/ChunAllen/repos","events_url":"https://api.github.com/users/ChunAllen/events{/privacy}","received_events_url":"https://api.github.com/users/ChunAllen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-04T03:54:39Z","updated_at":"2015-03-04T06:50:52Z","closed_at":"2015-03-04T06:50:52Z","body":"Hi @ddnexus I'm moving the flex functions to its model and made is as callback for example:\r\n\r\nHere's my model `Category`\r\n\r\n```\r\nclass Category < ActiveRecord::Base \r\n  after_create :create_by_flex\r\n  after_update :update_by_flex\r\n  after_destroy :destroy_by_flex\r\n\r\n  private\r\n    def create_by_flex\r\n      flex_store\r\n    end\r\n\r\n    def update_by_flex\r\n      flex_store\r\n    end\r\n\r\n    def destroy_by_flex\r\n      flex_remove\r\n    end\r\nend\r\n```\r\n\r\nNow I'm having error with my test environment because it cannot see the `flex functions.\r\nHow can we mock elasticsearch/flex functions in test environment?\r\n\r\n"}}