     end
 
     test "it generates JSON" do
-      definition = Any[conditions: [true, false]]
+      definition = Any[definitions: [true, false]]
       expected_json = "{\"operand\":\"any\",\"conditions\":[{\"operand\":\"boolean\",\"value\":true},{\"operand\":\"boolean\",\"value\":false}]}"
       actual_json = Rule.json(definition) |> JSEX.encode!
       assert actual_json == expected_json

    end

    test "it generates JSON" do
      definition = All[conditions: [true, false]]
      expected_json = "{\"operand\":\"all\",\"conditions\":[{\"operand\":\"boolean\",\"value\":true},{\"operand\":\"boolean\",\"value\":false}]}"
      actual_json = Rule.json(definition) |> JSEX.encode!
      assert actual_json == expected_json

    alias Yodado.Definition.IncludedIn, as: IncludedIn

    test "is true if the value of the param in the state is in the list of values" do
      definition = IncludedIn[actual_state_param_name: "username", allowed_values: ["francis", "bill", "zoey", "louis"]]
      assert Rule.matches?(definition, [{"username", "bill"}])
    end

    test "is false if the value of the param in the state is not in the list of values" do
      definition = IncludedIn[actual_state_param_name: "username", allowed_values: ["francis", "bill", "zoey", "louis"]]
      assert !Rule.matches?(definition, [{"username", "coach"}])
    end

    test "it generates JSON" do
      definition = IncludedIn[actual_state_param_name: "username", allowed_values: ["francis", "bill", "zoey", "louis"]]
      expected_json = "{\"operand\":\"included_in\",\"param_name\":\"username\",\"value\":[\"francis\",\"bill\",\"zoey\",\"louis\"]}"
      actual_json = Rule.json(definition) |> JSEX.encode!
      assert actual_json == expected_json
