Skip to content

Commit

Permalink
add new ignored test
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Evanczuk committed Jun 3, 2023
1 parent 2d849d7 commit a8804e0
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/packs/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,37 @@ end
);
}

#[test]
#[ignore]
fn test_has_many_association_with_class_name_after_block() {
let contents: String = String::from(
"\
class Foo
has_one :bar, -> { my_scope }, as: :owner, class_name: 'bar_class'
end
",
);

let references = extract_from_contents(contents);
assert_eq!(references.len(), 2);
let first_reference = references
.get(1)
.expect("There should be a reference at index 0");
assert_eq!(
Reference {
name: String::from("MyLeave"),
namespace_path: vec![String::from("Foo")],
location: Range {
start_row: 2,
start_col: 2,
end_row: 2,
end_col: 22
}
},
*first_reference,
);
}

#[test]
fn test_it_uses_the_namespace_of_inherited_class_when_referencing_inherited_class(
) {
Expand Down

0 comments on commit a8804e0

Please sign in to comment.