diff --git a/exercises/options/options2.rs b/exercises/options/options2.rs
index 75b66a3..eca03f0 100644
--- a/exercises/options/options2.rs
+++ b/exercises/options/options2.rs
@@ -3,23 +3,34 @@
// I AM NOT DONE
-fn main() {
- let optional_word = Some(String::from("rustlings"));
- // TODO: Make this an if let statement whose value is "Some" type
- word = optional_word {
- println!("The word is: {}", word);
- } else {
- println!("The optional word doesn't contain anything");
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn simple_option() {
+ let target = "rustlings";
+ let optional_target = Some(target);
+
+ // TODO: Make this an if let statement whose value is "Some" type
+ if let Some(word) = optional_target {
+ assert_eq!(word, target);
+ }
}
- let mut optional_integers_vec: Vec